Function MemHeader.initMemHeader

initMemHeader -- Init a memheader structure

static MemHeader* initMemHeader (
  ulong size,
  MemFlags attributes,
  short pri,
  void* membase,
  string name
);

Prepares a MemHeader structure for other memory functions. The MemHeader is created at the begin of the memory range. The rest of the memory is used to create a linked list of free mem chunks.

This code is called by addMemHeader() itself.

Parameters

NameDescription
size size of memory range to add
attributes memory attributes to associate with memory range
pri ln_Priority for this memory range
membase base address of memory to add
name a symbolic name for this memory range

Returns

A usable MemHeader for the given memory range.

See

addMemHeader(), remMemHeader(), Allocate(), deallocate()