I'm sure that, in addition to the memory allocated by kmalloc, some data
structures are also allocated to track it so that you can know what to
free when you use kfree, right? Well, combining a few things this way
would save a few bytes there too.
Also, if you're really worried about overflow, or you want a guard page
or whatever, then put the data structures at the end and set the initial
stack pointer appropriately.
Someone complained about a process structure already being too bloated.
Unless it's several K in size already, you can bloat it up all you
please this way.
Another advantage is that you could make the datastructures growable.
The stack grows down, and the data grows up. As long as they don't
meet, all is well.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/