Doc notes about salloc alignment
This commit is contained in:
@@ -18,6 +18,13 @@ extern "C" {
|
|||||||
* Once a particular SAlloc has given out all memory in a chunk, a new chunk
|
* Once a particular SAlloc has given out all memory in a chunk, a new chunk
|
||||||
* is allocated again, using the underlying malloc().
|
* is allocated again, using the underlying malloc().
|
||||||
*
|
*
|
||||||
|
* *Note* that salloc hands back densely packed memory. Allocating objects
|
||||||
|
* of different sizes from the same salloc is not recommended. e.g.
|
||||||
|
* first allocating space for a short, and then for a pointer might
|
||||||
|
* give back a pointer that is not suitable aligned.
|
||||||
|
* The first piece of memory handed back are suitable aligned for any type though,
|
||||||
|
* so allocating only pointers, or only shorts (or only a specific struct etc.)
|
||||||
|
* will give properly alignment to all objects from a SAlloc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Opaque handle to a SAlloc */
|
/** Opaque handle to a SAlloc */
|
||||||
|
|||||||
Reference in New Issue
Block a user