Doc notes about salloc alignment

This commit is contained in:
Nils O. Selåsdal
2013-01-16 21:19:14 +01:00
parent 5f68608e88
commit 2d5d4a5749
+7
View File
@@ -18,6 +18,13 @@ extern "C" {
* Once a particular SAlloc has given out all memory in a chunk, a new chunk
* 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 */