In message <[EMAIL PROTECTED]>, Anatoly Vorobey writes
:
>I have to malloc a lot of memory in the kernel, hence a few
>questions:
How much is "a lot" ?
>1. The data must be absolutely present at all times, no page
>faults or locking mechanisms, etc. Does that mean
>I should use kmem_alloc_wired() or am I misunderstanding its purpose?
>Does it make sense to alloc less than a pageful or is the rest simply
>going to be wasted?
malloc(9) should be used.
>
>2. Unfortunately, I need to realloc a lot as data is dynamic and I
>don't know sizes beforehand. How do I do that? Do I malloc a new
>region, copy manually and release the old one?
Yes, we have no realloc(9).
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message