lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: + inflate-refactor-inflate-malloc-code.patch added to -mm tree
Date
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> inflate: refactor inflate malloc code
>
> Inflate requires some dynamic memory allocation very early in the boot
> process and this is provided with a set of four functions:
> malloc/free/gzip_mark/gzip_release.
>
> The old inflate code used a mark/release strategy rather than
> implement free. This new version instead keeps a count on the number
> of outstanding allocations and when it hits zero, it resets the malloc
> arena.
>
> This allows removing all the mark and release implementations and
> unifying all the malloc/free implementations.
>
> The architecture-dependent code must define two addresses:
> - free_mem_ptr, the address of the beginning of the area in which
> allocations should be made
> - free_mem_end_ptr, the address of the end of the area in which
> allocations should be made. If set to 0, then no check is made on
> the number of allocations, it just grows as much as needed
>
> The architecture-dependent code can also provide an arch_decomp_wdog()
> function call. This function will be called several times during the
> decompression process, and allow to notify the watchdog that the
> system is still running. If an architecture provides such a call, then
> it must define ARCH_HAS_DECOMP_WDOG so that the generic inflate code
> calls arch_decomp_wdog().
>
> Work initially done by Matt Mackall <mpm@selenic.com>, updated to a
> recent version of the kernel by me.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Works on MN10300.

Acked-by: David Howells <dhowells@redhat.com>


\
 
 \ /
  Last update: 2008-03-12 15:53    [W:0.064 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site