> [EMAIL PROTECTED] wrote:
> > >Offtopic: Which still reminds me to write an email about that the
> > >Solaris kernel is very very malloc()-happy (which is unneccesary in many
> > >cases now that C99-sematics are allowed).
> > 
> > You are wrong.
> 
> Thank you... ;-((
> See below...
> 
> > We *malloc* not because of shortcomings in C but because
> > we don't have any room on the stack to put stuff.
> 
> - 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? Most of the allocations seem to be used for data 
structures - they are not temporary. 

__
- Alexander Kolbasov




_______________________________________________
perf-discuss mailing list
[email protected]

Reply via email to