[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] large memory block problem
all right . that's really work!
now i can get 50M memblock !
> On Fri, 11 Aug 2000, Wei Ren wrote:
>
> > > >#define MEM_SIZE 10000000 // 10M
> > > >unsigned long memory_block[MEM_SIZE];
> > > >
> try:
> unsigned long *memory_block=NULL;
> > > >int init_module(void)
> > > >{
>
> memory_block=vmalloc(MEM_SIZE*sizeof(unsigned long));
> if(memory_block==NULL) {
> printk(KERN_ERROR "allocation failed\n")
> return -ENOMEM;
> }
>
> do not forget to deallocate it (vfree) in cleanup_module.
>
> If you would like to be able to have access to this memory from user space
> (convinient for debugging) use mbuff_alloc.
>
> --
> Tomek
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
>