void* xspanalloc(ulong size, int align, ulong span)
void xfree(void *p)
Xalloc returns a pointer to a range of size bytes of memory. The memory will be zero filled and aligned on a 8 byte (BY2V) address. If the memory is not available, xalloc returns a null pointer.
Xspanalloc allocates memory given alignment and spanning constraints. The block returned will contain size bytes, aligned on a boundary that is 0 mod align, in such a way that the memory in the block does not span an address that is 0 mod span. Xspanalloc is intended for use allocating hardware data structures (eg, page tables) or I/O buffers that must satisfy specific alignment restrictions. If xspanalloc cannot allocate memory to satisfy the given constraints, it will panic(10.2). The technique it uses can sometimes cause memory to be wasted. Consequently, xspanalloc should be used sparingly.
Xfree frees the block of memory at p, which must be an address previously returned by xalloc (not xspanalloc).
|XALLOC(10.2 )||Rev: Tue Mar 31 02:42:39 GMT 2015|