diff --git a/include/ucore/ucore_salloc.h b/include/ucore/ucore_salloc.h index f9a00f6..4632316 100644 --- a/include/ucore/ucore_salloc.h +++ b/include/ucore/ucore_salloc.h @@ -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 */