X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fstruct%2Fheap.c;h=33c6de2acadca599ee7057a4dc6710df16a4fba8;hb=82aa9864bc5accc468d3c9ed109a8b44ef36da94;hp=27f8032567ae8945d70e6482a31a2c0afd90db85;hpb=c81265e6459403444c859758db53a9675c3a4ec7;p=bertos.git diff --git a/bertos/struct/heap.c b/bertos/struct/heap.c index 27f80325..33c6de2a 100644 --- a/bertos/struct/heap.c +++ b/bertos/struct/heap.c @@ -56,7 +56,7 @@ void heap_init(struct Heap* h, void* memory, size_t size) memset(memory, FREE_FILL_CODE, size); #endif - ASSERT2((((uintptr_t)memory % sizeof(heap_buf_t)) == 0), + ASSERT2(((size_t)memory % alignof(heap_buf_t)) == 0, "memory buffer is unaligned, please use the HEAP_DEFINE_BUF() macro to declare heap buffers!\n"); /* Initialize heap with a single big chunk */