hi,

  i want to use some large memory block in my module, so i does this:
in my app.c

#define MEM_SIZE  10000000 // 10M
unsigned long memory_block[MEM_SIZE];

int init_module(void)
{
    int i;
    for(i = 0 ;i <MEM_SIZE; i++)
    {
         memory_block[i] =  0x5f5f5f5f;
    }
   ....
}

 my box has 64M memory.
 i compiled this module, then insmod it .
 at the first time, it runs ok. i rmmod it.
 the second time i insmod it, it reports : Out of memory.

 is this method SAFE to kernel ?  or is there any other method 
  to get such large memory in my module?








-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to