EPITA – Project Recap

It has been one month that the third year (called Ing1) of EPITA started and this is a recap of the interesting projects that I developed.

malloc (1 week)
The goal of this mini-project is to improve our knowledge of memory management by implementing the C standard library memory allocator (malloc, free, realloc). Implementation using the Binary Buddy technique:

  • List of free blocks of size 2^k.
  • Split and Merge using adjacent block of the same size called buddy.
  • Insertion and Deletion in O(log n).
  • 32 & 64 bit ready.

find (1 week)
find is a very well known UNIX command used to satisfy research upon files and directories.

  • File listing and options parsing with error handling.
  • -name: Filtering using globbing.
  • -newer, -atime, -size, -inum, -type, -links: Filtering off information sources. Handles -/+ for "less/more than".
  • -perm: Filtering based on permission expressed in octal (0777) or symbolic (u+rwx,go=r) notation.

fnmatch (10 hours)
fnmatch is a function that implements globbing. It returns whether the string matches the pattern. This is mainly used to filter out files (eg: *.txt) or text search in databases (eg: LIKE '%Text%').

  • *: any character 0 or more times.
  • ?: any character 1 time.
  • [abcA-Z]: any character from the class.
  • \*: escaping.

Libstream (10 hours)
I/O functions are slow hence they should be called few time as possible. This is why they are typically buffered. The project is to recode all the I/O buffered functions of the C standard library as they are defined by the Single UNIX Specifications V3.

  • fopen, fclose, fgetc, fputc, fflush: Core functions to handle buffered I/O at a character level.
  • fseek, ftell, frewind: File positioning functions.
  • fread, fwrite, fgets, fputs, fgetdelim: Helper functions to use buffered I/O at a string level.
  • tinyPrintf: Basic string formatting (%d, %u, %s, %c, %o, %x without modifiers).
If you liked this article, you might be interested in my Twitter feed as well.
 
 

Related Posts

  • September 25, 2011 Javascript Object Difference (5)
    This article is about a difference algorithm. It extracts changes from one version of an object to another. It helps storing a smaller amount of information. Template In a project, I have a template object with all the default settings for a widget. var template = { […]
  • September 24, 2011 Javascript: Cyclic Object Detection (15)
    URLON.stringify() suffer from a problem, when passed an object that contains a cycle, it will never stop. This article shows 3 techniques in order to detect if an object is cyclical. Edit the object: Mark In order to detect a cycle in an object, the method we learn at school is to […]
  • April 5, 2012 Climb – Property-based dispatch in functional languages (4)
    ELS Presentation | A Generic and Dynamic Approach to Image Processing | Chaining Operators & Component Trees | Property-based dispatch in functional languages This is the third (and last) presentation about my work on Climb at the LRDE. During the first one I tackled genericity […]
  • October 5, 2011 Javascript Presentation (2)
    The talk is over. Check out the Slides & Video. For several months now I've been surveying my friends and teachers at EPITA and I came to the conclusion that they have absolutly no idea what Javascript really is. In order to help them discover a language that is getting a lot of […]
  • December 7, 2011 C++: Fuzzy Search with Trie (2)
    For a school project, I had to make a part of a spell-check program. Given a dictionnary of words, you have to determine all the words that are within K mistakes of the original word. Trie As input, we've got a list of words along with their frequency. For example, with the following […]