mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-31 16:57:58 +00:00
Replaced "%x" with "%lx"
This commit is contained in:
parent
e8d8f45c8a
commit
045592d8e6
@ -150,7 +150,7 @@ static void liballoc_dump()
|
|||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
while (maj != NULL)
|
while (maj != NULL)
|
||||||
{
|
{
|
||||||
printf("liballoc: %x: total = %i, used = %i\n",
|
printf("liballoc: %lx: total = %i, used = %i\n",
|
||||||
maj,
|
maj,
|
||||||
maj->size,
|
maj->size,
|
||||||
maj->usage);
|
maj->usage);
|
||||||
@ -158,7 +158,7 @@ static void liballoc_dump()
|
|||||||
min = maj->first;
|
min = maj->first;
|
||||||
while (min != NULL)
|
while (min != NULL)
|
||||||
{
|
{
|
||||||
printf("liballoc: %x: %i bytes\n",
|
printf("liballoc: %lx: %i bytes\n",
|
||||||
min,
|
min,
|
||||||
min->size);
|
min->size);
|
||||||
min = min->next;
|
min = min->next;
|
||||||
@ -216,7 +216,7 @@ static struct liballoc_major *allocate_new_page(unsigned int size)
|
|||||||
l_allocated += maj->size;
|
l_allocated += maj->size;
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("liballoc: Resource allocated %x of %i pages (%i bytes) for %i size.\n", maj, st, maj->size, size);
|
printf("liballoc: Resource allocated %lx of %i pages (%i bytes) for %i size.\n", maj, st, maj->size, size);
|
||||||
|
|
||||||
printf("liballoc: Total memory usage = %i KB\n", (int)((l_allocated / (1024))));
|
printf("liballoc: Total memory usage = %i KB\n", (int)((l_allocated / (1024))));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -250,7 +250,7 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
{
|
{
|
||||||
l_warningCount += 1;
|
l_warningCount += 1;
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: WARNING: alloc( 0 ) called from %x\n",
|
printf("liballoc: WARNING: alloc( 0 ) called from %lx\n",
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
@ -281,13 +281,13 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("liballoc: set up first memory major %x\n", l_memRoot);
|
printf("liballoc: set up first memory major %lx\n", l_memRoot);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("liballoc: %x PREFIX(malloc)( %i ): ",
|
printf("liballoc: %lx PREFIX(malloc)( %i ): ",
|
||||||
__builtin_return_address(0),
|
__builtin_return_address(0),
|
||||||
size);
|
size);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -328,7 +328,7 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
if (diff < (size + sizeof(struct liballoc_minor)))
|
if (diff < (size + sizeof(struct liballoc_minor)))
|
||||||
{
|
{
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("CASE 1: Insufficient space in block %x\n", maj);
|
printf("CASE 1: Insufficient space in block %lx\n", maj);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -380,7 +380,7 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
ALIGN(p);
|
ALIGN(p);
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("CASE 2: returning %x\n", p);
|
printf("CASE 2: returning %lx\n", p);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
liballoc_unlock(); // release the lock
|
liballoc_unlock(); // release the lock
|
||||||
@ -416,7 +416,7 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
ALIGN(p);
|
ALIGN(p);
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("CASE 3: returning %x\n", p);
|
printf("CASE 3: returning %lx\n", p);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
liballoc_unlock(); // release the lock
|
liballoc_unlock(); // release the lock
|
||||||
@ -462,7 +462,7 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
ALIGN(p);
|
ALIGN(p);
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("CASE 4.1: returning %x\n", p);
|
printf("CASE 4.1: returning %lx\n", p);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
liballoc_unlock(); // release the lock
|
liballoc_unlock(); // release the lock
|
||||||
@ -501,7 +501,7 @@ void *PREFIX(malloc)(size_t req_size)
|
|||||||
ALIGN(p);
|
ALIGN(p);
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("CASE 4.2: returning %x\n", p);
|
printf("CASE 4.2: returning %lx\n", p);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -567,7 +567,7 @@ void PREFIX(free)(void *ptr)
|
|||||||
{
|
{
|
||||||
l_warningCount += 1;
|
l_warningCount += 1;
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: WARNING: PREFIX(free)( NULL ) called from %x\n",
|
printf("liballoc: WARNING: PREFIX(free)( NULL ) called from %lx\n",
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
#endif
|
#endif
|
||||||
@ -592,7 +592,7 @@ void PREFIX(free)(void *ptr)
|
|||||||
{
|
{
|
||||||
l_possibleOverruns += 1;
|
l_possibleOverruns += 1;
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: ERROR: Possible 1-3 byte overrun for magic %x != %x\n",
|
printf("liballoc: ERROR: Possible 1-3 byte overrun for magic %lx != %lx\n",
|
||||||
min->magic,
|
min->magic,
|
||||||
LIBALLOC_MAGIC);
|
LIBALLOC_MAGIC);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -602,7 +602,7 @@ void PREFIX(free)(void *ptr)
|
|||||||
if (min->magic == LIBALLOC_DEAD)
|
if (min->magic == LIBALLOC_DEAD)
|
||||||
{
|
{
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: ERROR: multiple PREFIX(free)() attempt on %x from %x.\n",
|
printf("liballoc: ERROR: multiple PREFIX(free)() attempt on %lx from %lx.\n",
|
||||||
ptr,
|
ptr,
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -611,7 +611,7 @@ void PREFIX(free)(void *ptr)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: ERROR: Bad PREFIX(free)( %x ) called from %x\n",
|
printf("liballoc: ERROR: Bad PREFIX(free)( %lx ) called from %lx\n",
|
||||||
ptr,
|
ptr,
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -624,7 +624,7 @@ void PREFIX(free)(void *ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBALLOCDEBUG
|
#ifdef LIBALLOCDEBUG
|
||||||
printf("liballoc: %x PREFIX(free)( %x ): ",
|
printf("liballoc: %lx PREFIX(free)( %lx ): ",
|
||||||
__builtin_return_address(0),
|
__builtin_return_address(0),
|
||||||
ptr);
|
ptr);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -736,7 +736,7 @@ void *PREFIX(realloc)(void *p, size_t size)
|
|||||||
{
|
{
|
||||||
l_possibleOverruns += 1;
|
l_possibleOverruns += 1;
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: ERROR: Possible 1-3 byte overrun for magic %x != %x\n",
|
printf("liballoc: ERROR: Possible 1-3 byte overrun for magic %lx != %lx\n",
|
||||||
min->magic,
|
min->magic,
|
||||||
LIBALLOC_MAGIC);
|
LIBALLOC_MAGIC);
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -746,7 +746,7 @@ void *PREFIX(realloc)(void *p, size_t size)
|
|||||||
if (min->magic == LIBALLOC_DEAD)
|
if (min->magic == LIBALLOC_DEAD)
|
||||||
{
|
{
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: ERROR: multiple PREFIX(free)() attempt on %x from %x.\n",
|
printf("liballoc: ERROR: multiple PREFIX(free)() attempt on %lx from %lx.\n",
|
||||||
ptr,
|
ptr,
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
@ -755,7 +755,7 @@ void *PREFIX(realloc)(void *p, size_t size)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
#if defined LIBALLOCDEBUG || defined LIBALLOCINFO
|
||||||
printf("liballoc: ERROR: Bad PREFIX(free)( %x ) called from %x\n",
|
printf("liballoc: ERROR: Bad PREFIX(free)( %lx ) called from %lx\n",
|
||||||
ptr,
|
ptr,
|
||||||
__builtin_return_address(0));
|
__builtin_return_address(0));
|
||||||
FLUSH();
|
FLUSH();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user