a) initialize *all* the head nodes
b) the lowmem heap needs to be paragraph (16 byte) aligned
c) use a dedicated tag value for headnodes. The type code should be
removed and replaced with special tag values for head node and
free.
d) for libcom32 code called from the core, do NOT present a
usable bounce buffer; we should only ever use lmalloc/lfree.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
dd 8 ; Argument count
dd 0 ; No command line
dd core_intcall ; Intcall entry point
- dd core_xfer_buf ; Bounce buffer address
- dd 1 << 16 ; 64K bounce buffer
+ dd 0 ; Bounce buffer address
+ dd 0 ; 64K bounce buffer
dd core_farcall ; Farcall entry point
dd core_cfarcall ; Cfarcall entry point
HighMemSize dd 0 ; End of memory pointer (bytes)
dd pm_api_vector ; Protected mode functions
-
for (i = 0 ; i < NHEAP ; i++) {
fp->a.next = fp->a.prev = fp->next_free = fp->prev_free = fp;
fp->a.attrs = ARENA_TYPE_HEAD | (i << ARENA_HEAP_POS);
+ fp->a.tag = MALLOC_HEAD;
+ fp++;
}
/* Initialize the main heap */
typedef size_t malloc_tag_t;
enum malloc_owner {
MALLOC_FREE,
+ MALLOC_HEAD,
MALLOC_CORE,
MALLOC_MODULE,
};
__high_clear_dwords = (__high_clear_len + 3) >> 2;
/* Start of the lowmem heap */
+ . = ALIGN(16);
__lowmem_heap = .;
/*