Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2006 09:37:37 +0100
From:      Marc =?iso-8859-1?q?L=F6rner?= <marc.loerner@hob.de>
To:        freebsd-hackers@freebsd.org
Subject:   Allocate aligned memory
Message-ID:  <200612150937.37737.marc.loerner@hob.de>

next in thread | raw e-mail | index | archive | help
Hello all,

I want to allocate 120KB of memory thats aligned to 32KB.
I already saw/found the function contigmalloc, now my question is, why 
following functioncall never does return with an resulting address, instead 
null is returned?

unsigned long *p = (unsigned long*) 
	contigmalloc(120*1024, M_DEVBUF, M_WAITOK, 0, (1<<22), 32*1024, 1024*1024);

Thanks in advance,
Marc

P.S.: I'm already aware that contigmalloc doesn't support M_WAITOK!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612150937.37737.marc.loerner>