Allocates a region of global memory in the 64-bit kernel.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
int vm_galloc (int type, vmsize_t size, ulong * eaddr)
The vm_galloc kernel service allocates memory from the kernel global memory pool on the 64-bit kernel. The allocation size is rounded up to the nearest 4K boundary. The default page protection key for global memory segments is 00 unless overridden with the V_UREAD flag.
The type field may have the following values, which may be combined:
V_WORKING | Required. Creates a working storage segment. |
V_SYSTEM | The new allocation is a global system area that does not belong to any application. Storage reference errors to this area will result in system crashes. |
V_UREAD | Overrides the default page protection of 00 and creates the new region with a default page protection of 01. |
The vm_galloc kernel service is intended for subsystems that have large data structures for which xmalloc is not the best choice for management. The kernel xmalloc heap itself does reside in global memory.
The vm_galloc kernel service can be called from the process environment only.
The vm_gfree kernel service.
Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.