This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Reducing memory fragmentation in GNOME

Firefox 3 has undergone a lot of work to reduce memory fragmentation and the number of heap allocations, with great results. GNOME needs the same kind of analysis. This will help us reduce the base memory footprint of long-running applications, and possibly their maximum memory footprint as well.

During the lifetime of a process, it allocates and deallocates things from the heap with malloc()/free(). Naturally, these allocations and deallocations happen in semi-random order, and the heap becomes fragmented. Even though the heap may have enough free space for a new allocation request, that space may not be contiguous. So, the program will need to grow the heap, requesting new memory pages from the kernel, to satisfy this request.

1.1. Your mission

1.2. Required knowledge

You need to be very familiar with C coding.

You need to be moderately familiar with low-level tools like Valgrind, glibc's hooks, d-trace, etc.

You'll have to use plotting tools like gnuplot (or hand-build tools) to produce charts of allocations.

Experience with profiling applications is desirable.

1.3. References

1.4. Mentoring

Your mentor will be FedericoMenaQuintero. Feel free to mail him at federico@gnome.org


2024-10-23 11:28