diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-07-25 20:24:27 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-07-25 20:24:27 +0300 |
commit | 662e5b53bcfcd00353655b2ebfe5bbca53d65d30 (patch) | |
tree | 5a2f26f69b00b2c6d7d7ebeda198de3bd53f6195 | |
parent | 017bd0a6bbe6d3c5d404c265bf4700ec7abffa20 (diff) | |
download | bdwgc-662e5b53bcfcd00353655b2ebfe5bbca53d65d30.tar.gz |
Remove code commented out by 'ifdef UNDEFINED'
* finalize.c [UNDEFINED] (GC_invoke_finalizers): Remove
GC_free(curr_fo) call; update comment.
* include/private/gcconfig.h [UNDEFINED] (_etext, DATASTART): Remove.
* typd_mlc.c [UNDEFINED] (GC_make_complex_array_descriptor): Likewise.
-rw-r--r-- | finalize.c | 9 | ||||
-rw-r--r-- | include/private/gcconfig.h | 8 | ||||
-rw-r--r-- | typd_mlc.c | 17 |
3 files changed, 3 insertions, 31 deletions
@@ -1198,12 +1198,9 @@ GC_API int GC_CALL GC_invoke_finalizers(void) curr_fo -> fo_client_data); curr_fo -> fo_client_data = 0; ++count; -# ifdef UNDEFINED - /* This is probably a bad idea. It throws off accounting if */ - /* nearly all objects are finalizable. O.w. it shouldn't */ - /* matter. */ - GC_free((void *)curr_fo); -# endif + /* Explicit freeing of curr_fo is probably a bad idea. */ + /* It throws off accounting if nearly all objects are */ + /* finalizable. Otherwise it should not matter. */ } /* bytes_freed_before is initialized whenever count != 0 */ if (count != 0 && bytes_freed_before != GC_bytes_freed) { diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 21dba21b..971ba03e 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -1366,10 +1366,6 @@ /* thus allowing the heap to grow to ~3GB */ # ifdef __ELF__ # define DYNAMIC_LOADING -# ifdef UNDEFINED /* includes ro data */ - extern int _etext[]; -# define DATASTART ((ptr_t)((((word)(_etext)) + 0xfff) & ~0xfff)) -# endif # include <features.h> # if defined(__GLIBC__) && __GLIBC__ >= 2 \ || defined(PLATFORM_ANDROID) @@ -2420,10 +2416,6 @@ # endif # ifdef __ELF__ # define DYNAMIC_LOADING -# ifdef UNDEFINED /* includes ro data */ - extern int _etext[]; -# define DATASTART ((ptr_t)((((word)(_etext)) + 0xfff) & ~0xfff)) -# endif # include <features.h> # define SEARCH_FOR_DATA_START extern int _end[]; @@ -327,23 +327,6 @@ GC_make_sequence_descriptor(complex_descriptor *first, return((complex_descriptor *)result); } -#ifdef UNDEFINED - complex_descriptor * GC_make_complex_array_descriptor(word nelements, - complex_descriptor *descr) - { - struct ComplexArrayDescriptor * result = - (struct ComplexArrayDescriptor *) - GC_malloc(sizeof(struct ComplexArrayDescriptor)); - - if (result != 0) { - result -> ad_tag = ARRAY_TAG; - result -> ad_nelements = nelements; - result -> ad_element_descr = descr; - } - return((complex_descriptor *)result); - } -#endif - STATIC ptr_t * GC_eobjfreelist = NULL; STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr, |