|
From: Martin R. <ru...@us...> - 2004-08-10 02:29:01
|
Update of /cvsroot/foo/fooelk/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11256/src Modified Files: heap-gen.c stab-elf.c Log Message: integrated recent changes in elk's svn repository. throws lots of warnings while compiling due to new warning flags enabled in configure.ac. don't mind Index: stab-elf.c =================================================================== RCS file: /cvsroot/foo/fooelk/src/stab-elf.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** stab-elf.c 6 Aug 2004 20:56:42 -0000 1.1.1.1 --- stab-elf.c 10 Aug 2004 02:28:52 -0000 1.2 *************** *** 43,48 **** SYMTAB * ! Snarf_Symbols (lf) ! int lf; { SYMTAB *tab = NULL; --- 43,47 ---- SYMTAB * ! Snarf_Symbols (int lf) { SYMTAB *tab = NULL; Index: heap-gen.c =================================================================== RCS file: /cvsroot/foo/fooelk/src/heap-gen.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** heap-gen.c 6 Aug 2004 20:56:42 -0000 1.1.1.1 --- heap-gen.c 10 Aug 2004 02:28:52 -0000 1.2 *************** *** 100,104 **** static char *saved_heap_ptr; gcspace_t *space; ! static gcspace_t *type, *pmap; static pageno_t *linked; --- 100,104 ---- static char *saved_heap_ptr; gcspace_t *space; ! static gcspace_t *types, *pmap; static pageno_t *linked; *************** *** 198,203 **** PAGE_TO_ADDR ((b))) || \ (space[a] == space[b] && \ ! type[(a)&hp_per_pp_mask] == OBJECTPAGE && \ ! type[((b)&hp_per_pp_mask)+hp_per_pp] == OBJECTPAGE)) /* check whether the (physical) page starting at address addr is protected --- 198,203 ---- PAGE_TO_ADDR ((b))) || \ (space[a] == space[b] && \ ! types[(a)&hp_per_pp_mask] == OBJECTPAGE && \ ! types[((b)&hp_per_pp_mask)+hp_per_pp] == OBJECTPAGE)) /* check whether the (physical) page starting at address addr is protected *************** *** 328,332 **** *len = 1; ! while (type[ADDR_TO_PAGE (*addr)] != OBJECTPAGE) { *addr -= bytes_per_pp; (*len)++; --- 328,332 ---- *len = 1; ! while (types[ADDR_TO_PAGE (*addr)] != OBJECTPAGE) { *addr -= bytes_per_pp; (*len)++; *************** *** 336,340 **** while (ADDR_TO_PAGE(addr1) <= lastpage && space[ADDR_TO_PAGE(addr1)] > 0 && ! type[ADDR_TO_PAGE(addr1)] != OBJECTPAGE) { addr1 += bytes_per_pp; (*len)++; --- 336,340 ---- while (ADDR_TO_PAGE(addr1) <= lastpage && space[ADDR_TO_PAGE(addr1)] > 0 && ! types[ADDR_TO_PAGE(addr1)] != OBJECTPAGE) { addr1 += bytes_per_pp; (*len)++; *************** *** 535,545 **** space = (gcspace_t *)malloc (logical_pages*sizeof (gcspace_t)); ! type = (gcspace_t *)malloc ((logical_pages + 1)*sizeof (gcspace_t)); pmap = (gcspace_t *)malloc (physical_pages*sizeof (gcspace_t)); linked = (pageno_t *)malloc (logical_pages*sizeof (pageno_t)); ! if (!space || !type || !pmap || !linked) { free (heap_ptr); if (space) free ((char*)space); ! if (type) free ((char*)type); if (pmap) free ((char*)pmap); if (linked) free ((char*)linked); --- 535,545 ---- space = (gcspace_t *)malloc (logical_pages*sizeof (gcspace_t)); ! types = (gcspace_t *)malloc ((logical_pages + 1)*sizeof (gcspace_t)); pmap = (gcspace_t *)malloc (physical_pages*sizeof (gcspace_t)); linked = (pageno_t *)malloc (logical_pages*sizeof (pageno_t)); ! if (!space || !types || !pmap || !linked) { free (heap_ptr); if (space) free ((char*)space); ! if (types) free ((char*)types); if (pmap) free ((char*)pmap); if (linked) free ((char*)linked); *************** *** 547,556 **** } ! memset (type, 0, (logical_pages + 1)*sizeof (gcspace_t)); memset (pmap, 0, physical_pages*sizeof (gcspace_t)); memset (linked, 0, logical_pages*sizeof (unsigned int)); space -= firstpage; /* to index the arrays with the heap page number */ ! type -= firstpage; ! type[lastpage+1] = OBJECTPAGE; linked -= firstpage; #ifndef ARRAY_BROKEN --- 547,556 ---- } ! memset (types, 0, (logical_pages + 1)*sizeof (gcspace_t)); memset (pmap, 0, physical_pages*sizeof (gcspace_t)); memset (linked, 0, logical_pages*sizeof (unsigned int)); space -= firstpage; /* to index the arrays with the heap page number */ ! types -= firstpage; ! types[lastpage+1] = OBJECTPAGE; linked -= firstpage; #ifndef ARRAY_BROKEN *************** *** 689,693 **** for (i = firstpage; i <= lastpage; i++) { new_link[i + offset] = linked[i] + offset; ! new_type[i + offset] = type[i]; } for (addr = PAGE_TO_ADDR (firstpage); addr <= PAGE_TO_ADDR (lastpage); --- 689,693 ---- for (i = firstpage; i <= lastpage; i++) { new_link[i + offset] = linked[i] + offset; ! new_type[i + offset] = types[i]; } for (addr = PAGE_TO_ADDR (firstpage); addr <= PAGE_TO_ADDR (lastpage); *************** *** 717,721 **** free ((char*)(linked+firstpage)); ! free ((char*)(type+firstpage)); free ((char*)(space+firstpage)); --- 717,721 ---- free ((char*)(linked+firstpage)); ! free ((char*)(types+firstpage)); free ((char*)(space+firstpage)); *************** *** 727,731 **** linked = new_link; ! type = new_type; space = new_space; pmap = new_pmap; --- 727,731 ---- linked = new_link; ! types = new_type; space = new_space; pmap = new_pmap; *************** *** 756,760 **** free ((char*)(linked+firstpage)); ! free ((char*)(type+firstpage)); free ((char*)(space+firstpage)); --- 756,760 ---- free ((char*)(linked+firstpage)); ! free ((char*)(types+firstpage)); free ((char*)(space+firstpage)); *************** *** 835,842 **** if (cont_free == npg) { space[first_freepage] = current_space; ! type[first_freepage] = OBJECTPAGE; for (n = 1; n < npg; n++) { space[first_freepage+n] = current_space; ! type[first_freepage+n] = CONTPAGE; } current_freep = PAGE_TO_OBJ (first_freepage); --- 835,842 ---- if (cont_free == npg) { space[first_freepage] = current_space; ! types[first_freepage] = OBJECTPAGE; for (n = 1; n < npg; n++) { space[first_freepage+n] = current_space; ! types[first_freepage+n] = CONTPAGE; } current_freep = PAGE_TO_OBJ (first_freepage); *************** *** 969,973 **** forwarded_pages++; space[forward_freepage] = forward_space; ! type[forward_freepage] = OBJECTPAGE; forward_freep = PAGE_TO_OBJ (forward_freepage); forward_free = PAGEWORDS; --- 969,973 ---- forwarded_pages++; space[forward_freepage] = forward_space; ! types[forward_freepage] = OBJECTPAGE; forward_freep = PAGE_TO_OBJ (forward_freepage); forward_free = PAGEWORDS; *************** *** 1241,1245 **** static int ScanCluster (gcptr_t addr) { ! register pageno_t page, lastpage; pageno_t npages; int n = 0; --- 1241,1245 ---- static int ScanCluster (gcptr_t addr) { ! register pageno_t page, last; pageno_t npages; int n = 0; *************** *** 1253,1259 **** rescan_cluster: ! lastpage = ADDR_TO_PAGE ((gcptr_t)scanlast); ! for (page = ADDR_TO_PAGE ((gcptr_t)scanfirst); page <= lastpage; page++) { ! if (STABLE (page) && type[page] == OBJECTPAGE) { scanpointer = PAGE_TO_OBJ (page); #ifdef ALIGN_8BYTE --- 1253,1259 ---- rescan_cluster: ! last = ADDR_TO_PAGE ((gcptr_t)scanlast); ! for (page = ADDR_TO_PAGE ((gcptr_t)scanfirst); page <= last; page++) { ! if (STABLE (page) && types[page] == OBJECTPAGE) { scanpointer = PAGE_TO_OBJ (page); #ifdef ALIGN_8BYTE |