Index: memory.c =================================================================== RCS file: /home/perlcvs/parrot/memory.c,v retrieving revision 1.25 diff -u -r1.25 memory.c --- memory.c 5 Mar 2002 17:38:59 -0000 1.25 +++ memory.c 6 Mar 2002 04:45:32 -0000 @@ -39,7 +39,7 @@ cheaper, though. */ void * -mem_allocate_aligned(UINTVAL size) +mem_allocate_aligned(size_t size) { ptrcast_t max_to_alloc = 0; ptrcast_t mask = 0; @@ -69,7 +69,7 @@ uses malloc to allocate system memory */ void * -mem_sys_allocate(UINTVAL size) +mem_sys_allocate(size_t size) { return malloc((size_t)size); } @@ -78,7 +78,7 @@ resize a chunk of system memory */ void * -mem_sys_realloc(void *from, UINTVAL size) +mem_sys_realloc(void *from, size_t size) { return realloc(from, size); } @@ -129,10 +129,10 @@ } void * -mem_realloc(struct Parrot_Interp *interpreter, void *from, UINTVAL fromsize, - UINTVAL tosize) +mem_realloc(struct Parrot_Interp *interpreter, void *from, size_t fromsize, + size_t tosize) { - UINTVAL copysize = (fromsize > tosize ? tosize : fromsize); + size_t copysize = (fromsize > tosize ? tosize : fromsize); void *mem; mem = Parrot_allocate(interpreter, copysize); if (!mem) { Index: packfile.c =================================================================== RCS file: /home/perlcvs/parrot/packfile.c,v retrieving revision 1.28 diff -u -r1.28 packfile.c --- packfile.c 5 Mar 2002 05:30:17 -0000 1.28 +++ packfile.c 6 Mar 2002 04:45:35 -0000 @@ -59,7 +59,7 @@ struct PackFile * PackFile_new(void) { - struct PackFile *self = mem_sys_allocate((UINTVAL)sizeof(struct PackFile)); + struct PackFile *self = mem_sys_allocate(sizeof(struct PackFile)); if (!self) { fprintf(stderr, "PackFile_new: Unable to allocate!\n"); @@ -598,7 +598,7 @@ PackFile_FixupTable_new(void) { struct PackFile_FixupTable *self = - mem_sys_allocate((UINTVAL)sizeof(struct PackFile_FixupTable)); + mem_sys_allocate(sizeof(struct PackFile_FixupTable)); self->dummy = 0; @@ -770,7 +770,7 @@ PackFile_ConstTable_new(void) { struct PackFile_ConstTable *self = - mem_sys_allocate((UINTVAL)sizeof(struct PackFile_ConstTable)); + mem_sys_allocate(sizeof(struct PackFile_ConstTable)); self->const_count = 0; self->constants = NULL; @@ -1152,7 +1152,7 @@ PackFile_Constant_new(void) { struct PackFile_Constant *self = - mem_sys_allocate((UINTVAL)sizeof(struct PackFile_Constant)); + mem_sys_allocate(sizeof(struct PackFile_Constant)); self->type = PFC_NONE; @@ -1174,7 +1174,7 @@ PackFile_Constant_new_integer(opcode_t i) { struct PackFile_Constant *self = - mem_sys_allocate((UINTVAL)sizeof(struct PackFile_Constant)); + mem_sys_allocate(sizeof(struct PackFile_Constant)); self->type = PFC_INTEGER; self->integer = i; @@ -1197,7 +1197,7 @@ PackFile_Constant_new_number(FLOATVAL n) { struct PackFile_Constant *self = - mem_sys_allocate((UINTVAL)sizeof(struct PackFile_Constant)); + mem_sys_allocate(sizeof(struct PackFile_Constant)); self->type = PFC_NUMBER; self->number = n; @@ -1220,7 +1220,7 @@ PackFile_Constant_new_string(struct Parrot_Interp *interpreter, STRING *s) { struct PackFile_Constant *self = - mem_sys_allocate((UINTVAL)sizeof(struct PackFile_Constant)); + mem_sys_allocate(sizeof(struct PackFile_Constant)); self->type = PFC_STRING; self->string = string_copy(interpreter, s); Index: resources.c =================================================================== RCS file: /home/perlcvs/parrot/resources.c,v retrieving revision 1.20 diff -u -r1.20 resources.c --- resources.c 5 Mar 2002 21:25:16 -0000 1.20 +++ resources.c 6 Mar 2002 04:45:37 -0000 @@ -150,7 +150,7 @@ } } -Buffer *new_tracked_header(struct Parrot_Interp *interpreter, UINTVAL size) { +Buffer *new_tracked_header(struct Parrot_Interp *interpreter, size_t size) { UNUSED (interpreter); return (Buffer *)mem_sys_allocate(size); } @@ -325,7 +325,6 @@ else { /* The only thing left is "buffer of PMCs" */ Buffer *trace_buf = current->data; - UINTVAL i; PMC **cur_pmc = trace_buf->bufstart; for (i = 0; i < trace_buf->buflen; i++) { if (cur_pmc[i]) { @@ -683,8 +682,8 @@ was asked for or the default size, whichever's larger */ void * Parrot_alloc_new_block(struct Parrot_Interp *interpreter, - UINTVAL size, UINTVAL public) { - UINTVAL alloc_size = (size > DEFAULT_SIZE) ? size : DEFAULT_SIZE; + size_t size, UINTVAL public) { + size_t alloc_size = (size > DEFAULT_SIZE) ? size : DEFAULT_SIZE; struct Memory_Pool *new_pool; /* Allocate a new block. Header info's on the front, plus a fudge factor for good measure */ @@ -718,7 +717,7 @@ void * -Parrot_allocate(struct Parrot_Interp *interpreter, UINTVAL size) { +Parrot_allocate(struct Parrot_Interp *interpreter, size_t size) { char *return_val; if (NULL == interpreter) { return mem_sys_allocate(size); Index: include/parrot/memory.h =================================================================== RCS file: /home/perlcvs/parrot/include/parrot/memory.h,v retrieving revision 1.7 diff -u -r1.7 memory.h --- include/parrot/memory.h 4 Mar 2002 03:17:21 -0000 1.7 +++ include/parrot/memory.h 6 Mar 2002 04:45:37 -0000 @@ -13,15 +13,15 @@ #if !defined(PARROT_MEMORY_H_GUARD) #define PARROT_MEMORY_H_GUARD -void *mem_allocate_aligned(UINTVAL); +void *mem_allocate_aligned(size_t); -void *mem_sys_allocate(UINTVAL); +void *mem_sys_allocate(size_t); -void *mem_realloc(struct Parrot_Interp *, void *, UINTVAL, UINTVAL); +void *mem_realloc(struct Parrot_Interp *, void *, size_t, size_t); #define gc_used mem_realloc -void *mem_sys_realloc(void *, UINTVAL); +void *mem_sys_realloc(void *, size_t); void mem_sys_free(void *); Index: include/parrot/resources.h =================================================================== RCS file: /home/perlcvs/parrot/include/parrot/resources.h,v retrieving revision 1.17 diff -u -r1.17 resources.h --- include/parrot/resources.h 5 Mar 2002 17:39:10 -0000 1.17 +++ include/parrot/resources.h 6 Mar 2002 04:45:37 -0000 @@ -21,7 +21,7 @@ STRING *new_string_header(struct Parrot_Interp *); void free_string(STRING *); -Buffer *new_tracked_header(struct Parrot_Interp *, UINTVAL size); +Buffer *new_tracked_header(struct Parrot_Interp *, size_t size); void free_tracked(Buffer *); void *new_bigint_header(struct Parrot_Interp *); @@ -30,8 +30,8 @@ void *new_bignum_header(struct Parrot_Interp *); void free_bignum(void); -void *Parrot_allocate(struct Parrot_Interp *, UINTVAL size); -void *Parrot_alloc_new_block(struct Parrot_Interp *, UINTVAL, UINTVAL); +void *Parrot_allocate(struct Parrot_Interp *, size_t size); +void *Parrot_alloc_new_block(struct Parrot_Interp *, size_t, UINTVAL); void Parrot_new_pmc_header_arena(struct Parrot_Interp *interpreter); @@ -44,8 +44,8 @@ #define PMC_HEADERS_PER_ALLOC 128 struct PMC_Arena { - UINTVAL free; /* Count of PMCs free in this arena */ - UINTVAL used; /* Count of PMCs used in this arena */ + size_t free; /* Count of PMCs free in this arena */ + size_t used; /* Count of PMCs used in this arena */ struct PMC_Arena *prev; struct PMC_Arena *next; PMC *start_PMC; /* Next PMC in the arena ready to allocate */ @@ -53,8 +53,8 @@ }; struct STRING_Arena { - UINTVAL free; - UINTVAL used; + size_t free; + size_t used; struct STRING_Arena *prev; struct STRING_Arena *next; STRING *start_STRING; @@ -63,18 +63,18 @@ /* The free string header pool */ struct STRING_free_pool { Buffer pool_buffer; - UINTVAL entries_in_pool; + size_t entries_in_pool; }; /* The free PMC header pool */ struct PMC_free_pool { Buffer pool_buffer; - UINTVAL entries_in_pool; + size_t entries_in_pool; }; struct Memory_Pool { - UINTVAL free; - UINTVAL size; + size_t free; + size_t size; struct Memory_Pool *prev; struct Memory_Pool *next; char *start; @@ -87,7 +87,7 @@ struct Memory_Pool *memory_pool; struct STRING_free_pool *string_header_pool; struct PMC_free_pool *pmc_pool; - UINTVAL collections; + size_t collections; }; struct Stash { Index: io/io.c =================================================================== RCS file: /home/perlcvs/parrot/io/io.c,v retrieving revision 1.16 diff -u -r1.16 io.c --- io/io.c 21 Feb 2002 18:09:24 -0000 1.16 +++ io/io.c 6 Mar 2002 04:45:39 -0000 @@ -56,7 +56,7 @@ ParrotIOTable alloc_pio_array(int numhandles) { ParrotIOTable newhandles; - unsigned int size = numhandles * sizeof(ParrotIO *); + size_t size = numhandles * sizeof(ParrotIO *); newhandles = (ParrotIOTable)mem_sys_allocate(size); return newhandles; }
-- Bryan C. Warnock [EMAIL PROTECTED]