April 2012
Intermediate to advanced
352 pages
8h
English
The FreeBSD kernel provides two functions for contiguous physical memory management: contigmalloc and contigfree. Ordinarily, you’ll never use these functions. They’re primarily for dealing with machine-dependent code and the occasional network driver.
#include <sys/types.h>
#include <sys/malloc.h>
void *
contigmalloc(unsigned long size, struct malloc_type *type, int flags,
vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
unsigned long boundary);
void
contigfree(void *addr, unsigned long size, struct malloc_type *type);The contigmalloc function allocates size bytes of contiguous physical memory. If size is 0, contigmalloc will panic. If successful, the allocation will reside between physical ...
Read now
Unlock full access