Alexander Kolbasov wrote:
> > Create a C macro |#define KMEM_TMP_ALLOC()| which expands to the
> > following procedure:
> > 1. Measure stack size and current available space on stack. The first
> > 512bytes (of a 8k default stack, a 64k default stack would offer much
> > more room (this value is a tuneable, setting it to |0| will disable the
> > stack allocations)) are available to allocations via C99 constructs (if
> > this fails the size will simply be set to |0|).
> 
> Are there lots of such tmp allocations in the kernel to justify such
> special-purpose allocator?

Erm, if we skip [2] in my proposal we will not have a "special-purpose"
allocator, just the normal C style of allocating memory from stack. And
that's not bad, given the quite high overhead of going through the
normal allocator.

> Most of the allocations seem to be used for data
> structures - they are not temporary.

At least |getcwd()| and some other functions generate lots of temporary
allocations which could be caught with that.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to