[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cvs commit to debian-installer/libdebian-installer/src by waldi



On Thu, Nov 13, 2003 at 02:29:00PM -0700, waldi@debian.org wrote:
> Update of /cvs/debian-boot/debian-installer/libdebian-installer/src
> In directory gluck:/tmp/cvs-serv10695/src
> 
> Modified Files:
> 	Makefile.am exec.c hash.c mem.c packages.c parser_rfc822.c 
> 	string.c 
> Added Files:
> 	mem_chunk.c 
> Log Message:
> - cleanup includes
> - make code more modular
> 
> 
> --- NEW FILE: mem_chunk.c ---
...
> struct di_mem_area
> {
>   di_mem_area *next;           /**< the next mem area */
>   di_mem_area *prev;           /**< the previous mem area */
>   size_t index;                /**< the current index into the "mem" array */
>   size_t free;                 /**< the number of free bytes in this mem area */
>   size_t allocated;            /**< the number of atoms allocated from this area */
>   char mem[MEM_AREA_SIZE];     /**< the mem array from which atoms get allocated
>                                 *   the actual size of this array is determined by
>                                 *   the mem chunk "area_size". ANSI says that it
>                                 *   must be declared to be the maximum size it
>                                 *   can possibly be (even though the actual size
>                                 *   may be less).
>                                 */
> };

Havn't looked closely at this code, but that struct looks like it will
end up generating lots of unaligned access traps on ia64, as mem[] will
be on a 4 rather than 8 byte binary.  I'm a little confused, because I
thought this allocation stuff had been ripped out in favour of plain
malloc().

Richard



Reply to: