}
struct mem_block *
-mmInit(int ofs, int size)
+mmInit(unsigned int ofs, int size)
{
struct mem_block *heap, *block;
static struct mem_block *
SliceBlock(struct mem_block *p,
- int startofs, int size,
+ unsigned int startofs, int size,
int reserved, int alignment)
{
struct mem_block *newblock;
{
struct mem_block *p;
const int mask = (1 << align2)-1;
- int startofs = 0;
- int endofs;
+ unsigned int startofs = 0;
+ unsigned int endofs;
if (!heap || align2 < 0 || size <= 0)
return NULL;
struct mem_block *next, *prev;
struct mem_block *next_free, *prev_free;
struct mem_block *heap;
- int ofs,size;
+ unsigned int ofs;
+ int size;
unsigned int free:1;
unsigned int reserved:1;
};
* input: total size in bytes
* return: a heap pointer if OK, NULL if error
*/
-extern struct mem_block *mmInit(int ofs, int size);
+extern struct mem_block *mmInit(unsigned int ofs, int size);
/**
* Allocate 'size' bytes with 2^align2 bytes alignment,