Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/technotes/mem_reclaim.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/technotes/mem_reclaim.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/technotes/mem_reclaim.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/technotes/mem_reclaim.html on line 8
After the system has booted, the standard kernel includes a block of physical memory for the kernels' memory allocator. Now, the memory addition feature lets you add more physical memory to the system after it's started.
Use the _MEM_PMEM_ADD type and mem_pmem_add_t message structure to send a message to procnto to use the specified RAM for general allocation purposes.
For example, the following sample shows a partial illustartion of the memory addition feature:
int main(int argc, char *argv[]) {
void *ptr;
int fd, rc;
uintptr_t rsvd_paddr;
unsigned passed = 0;
struct {
mem_pmem_add_t pmem;
} msg;
iov_t useramram;
msg.pmem.i.type = _MEM_PMEM_ADD;
...
// attempt to reclaim the reserved memory
rc = MsgSendnc(MEMMGR_COID, &msg, sizeof msg, NULL, 0);
...
Use the following startup options to reserve specific RAM from general use, and then pass in these same parameters into your _MEM_PMEM_ADD():
-r paddr, size, <0|1>
To verify the physical address that was added by using the function mem_offset64(), you can request that physically contiguous memory be allocated by using either the MAP_PHYS, MAP_ANON, or MAP_PRIVATE flag; however, we recommend that you use the MAP_PHY flag.
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/technotes/mem_reclaim.html on line 91
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/technotes/mem_reclaim.html on line 91