|
@@ -54,6 +54,8 @@ void *memalign(size_t alignment, size_t size) {
|
|
|
DEFAULT_RB_T *encapsulated_rb;
|
|
|
raw_block_header_t *raw_block;
|
|
|
|
|
|
+ memptr = NULL;
|
|
|
+
|
|
|
/* Search the available freelist-organized raw blocks for a block whose size
|
|
|
* is size + alignment - 1 */
|
|
|
SLIST_FOREACH(raw_block, &systemallocator.rb_head, pointers) {
|
|
@@ -77,7 +79,7 @@ void *memalign(size_t alignment, size_t size) {
|
|
|
* happening and memcpy() is safe to be used, the alignment size is
|
|
|
* increased until it is bigger than the header size.
|
|
|
*/
|
|
|
- unsigned int counter;
|
|
|
+ unsigned int counter = 0;
|
|
|
if(alignment < sizeof(raw_block_header_t)) {
|
|
|
size_t new_alignment = alignment;
|
|
|
for(counter = 0; new_alignment < sizeof(raw_block_header_t);
|