[Openmcl-cvs-notifications] r10887 - /trunk/source/lisp-kernel/memory.c
gb at clozure.com
gb at clozure.com
Fri Sep 26 09:56:44 EDT 2008
Author: gb
Date: Fri Sep 26 09:56:44 2008
New Revision: 10887
Log:
Try to use new format-string constants.
Modified:
trunk/source/lisp-kernel/memory.c
Modified: trunk/source/lisp-kernel/memory.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/memory.c (original)
+++ trunk/source/lisp-kernel/memory.c Fri Sep 26 09:56:44 2008
@@ -43,7 +43,7 @@
allocation_failure(Boolean pointerp, natural size)
{
char buf[64];
- sprintf(buf, "Can't allocate %s of size %Id bytes.", pointerp ? "pointer=
" : "handle", size);
+ sprintf(buf, "Can't allocate %s of size " DECIMAL " bytes.", pointerp ? =
"pointer" : "handle", size);
Fatal(": Kernel memory allocation failure. ", buf);
}
=
@@ -177,7 +177,7 @@
MEM_RESERVE,
PAGE_NOACCESS);
if (!start) {
- fprintf(stderr, "Can't get desired heap address at 0x%Ix\n", want);
+ fprintf(stderr, "Can't get desired heap address at 0x" LISP "\n", want=
);
start =3D VirtualAlloc(0,
totalsize + heap_segment_size,
MEM_RESERVE,
@@ -209,7 +209,7 @@
mprotect(start, totalsize, PROT_NONE);
#endif
#if DEBUG_MEMORY
- fprintf(stderr, "Reserving heap at 0x%Ix, size 0x%Ix\n", start, totalsiz=
e);
+ fprintf(stderr, "Reserving heap at 0x" LISP ", size 0x" LISP "\n", start=
, totalsize);
#endif
return start;
}
@@ -218,7 +218,7 @@
CommitMemory (LogicalAddress start, natural len) {
LogicalAddress rc;
#if DEBUG_MEMORY
- fprintf(stderr, "Committing memory at 0x%Ix, size 0x%Ix\n", start, len);
+ fprintf(stderr, "Committing memory at 0x" LISP ", size 0x" LISP "\n", st=
art, len);
#endif
#ifdef WINDOWS
if ((start < ((LogicalAddress)nil_value)) &&
@@ -251,7 +251,7 @@
void
UnCommitMemory (LogicalAddress start, natural len) {
#if DEBUG_MEMORY
- fprintf(stderr, "Uncommitting memory at 0x%Ix, size 0x%Ix\n", start, len=
);
+ fprintf(stderr, "Uncommitting memory at 0x" LISP ", size 0x" LISP "\n", =
start, len);
#endif
#ifdef WINDOWS
int rc =3D VirtualFree(start, len, MEM_DECOMMIT);
@@ -278,7 +278,7 @@
MapMemory(LogicalAddress addr, natural nbytes, int protection)
{
#if DEBUG_MEMORY
- fprintf(stderr, "Mapping memory at 0x%Ix, size 0x%Ix\n", addr, nbytes);
+ fprintf(stderr, "Mapping memory at 0x" LISP ", size 0x" LISP "\n", addr,=
nbytes);
#endif
#ifdef WINDOWS
return VirtualAlloc(addr, nbytes, MEM_RESERVE|MEM_COMMIT, MEMPROTECT_RWX=
);
@@ -291,7 +291,7 @@
MapMemoryForStack(natural nbytes)
{
#if DEBUG_MEMORY
- fprintf(stderr, "Mapping stack of size 0x%Ix\n", nbytes);
+ fprintf(stderr, "Mapping stack of size 0x" LISP "\n", nbytes);
#endif
#ifdef WINDOWS
return VirtualAlloc(0, nbytes, MEM_RESERVE|MEM_COMMIT, MEMPROTECT_RWX);
@@ -304,7 +304,7 @@
UnMapMemory(LogicalAddress addr, natural nbytes)
{
#if DEBUG_MEMORY
- fprintf(stderr, "Unmapping memory at 0x%Ix, size 0x%Ix\n", addr, nbytes);
+ fprintf(stderr, "Unmapping memory at 0x" LISP ", size 0x" LISP "\n", add=
r, nbytes);
#endif
#ifdef WINDOWS
/* Can't MEM_RELEASE here because we only want to free a chunk */
@@ -318,7 +318,7 @@
ProtectMemory(LogicalAddress addr, natural nbytes)
{
#if DEBUG_MEMORY
- fprintf(stderr, "Protecting memory at 0x%Ix, size 0x%Ix\n", addr, nbytes=
);
+ fprintf(stderr, "Protecting memory at 0x" LISP ", size 0x" LISP "\n", ad=
dr, nbytes);
#endif
#ifdef WINDOWS
DWORD oldProtect;
@@ -326,7 +326,7 @@
=
if(!status) {
wperror("ProtectMemory VirtualProtect");
- Bug(NULL, "couldn't protect %Id bytes at %x, errno =3D %d", nbytes, ad=
dr, status);
+ Bug(NULL, "couldn't protect " DECIMAL " bytes at 0x" LISP ", errno =3D=
%d", nbytes, addr, status);
}
return status;
#else
@@ -334,7 +334,7 @@
=
if (status) {
status =3D errno;
- Bug(NULL, "couldn't protect %Id bytes at %Ix, errno =3D %d", nbytes, a=
ddr, status);
+ Bug(NULL, "couldn't protect " DECIMAL " bytes at " LISP ", errno =3D %=
d", nbytes, addr, status);
}
return status;
#endif
@@ -344,7 +344,7 @@
UnProtectMemory(LogicalAddress addr, natural nbytes)
{
#if DEBUG_MEMORY
- fprintf(stderr, "Unprotecting memory at 0x%Ix, size 0x%Ix\n", addr, nbyt=
es);
+ fprintf(stderr, "Unprotecting memory at 0x" LISP ", size 0x" LISP "\n", =
addr, nbytes);
#endif
#ifdef WINDOWS
DWORD oldProtect;
@@ -397,7 +397,7 @@
while (total < nbytes) {
count =3D read(fd, addr + total, nbytes - total);
total +=3D count;
- // fprintf(stderr, "read %Id bytes, for a total of %Id out of %Id so f=
ar\n", count, total, nbytes);
+ // fprintf(stderr, "read " DECIMAL " bytes, for a total of " DECIMAL "=
out of " DECIMAL " so far\n", count, total, nbytes);
if (!(count > 0))
return false;
}
More information about the Openmcl-cvs-notifications
mailing list