summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 08:00:05 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 08:00:05 +0000
commit204929af9dfc7d483d69476325c1ceac1721e219 (patch)
treed06aba1c98e6b4d319551a42c8b5d7c464b621f4 /gc.c
parent028c1b16c277b87179171a94a0d600c3d45b606b (diff)
* include/ruby/signal.h: removed.
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c, io.c, process.c, signal.c: vm_core.h: ditto. Some unused external global variables are also removed. (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending, rb_thread_critical) * ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c, ext/readline/readline.c, ext/socket/depend, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gc.c b/gc.c
index e46ace2..8d550b6 100644
--- a/gc.c
+++ b/gc.c
@@ -12,7 +12,6 @@
**********************************************************************/
#include "ruby/ruby.h"
-#include "ruby/signal.h"
#include "ruby/st.h"
#include "ruby/node.h"
#include "ruby/re.h"
@@ -553,10 +552,10 @@ vm_xmalloc(rb_objspace_t *objspace, size_t size)
(malloc_increase+size) > malloc_limit) {
garbage_collect(objspace);
}
- RUBY_CRITICAL(mem = malloc(size));
+ mem = malloc(size);
if (!mem) {
if (garbage_collect(objspace)) {
- RUBY_CRITICAL(mem = malloc(size));
+ mem = malloc(size);
}
if (!mem) {
rb_memerror();
@@ -592,10 +591,10 @@ vm_xrealloc(rb_objspace_t *objspace, void *ptr, size_t size)
ptr = (size_t *)ptr - 1;
#endif
- RUBY_CRITICAL(mem = realloc(ptr, size));
+ mem = realloc(ptr, size);
if (!mem) {
if (garbage_collect(objspace)) {
- RUBY_CRITICAL(mem = realloc(ptr, size));
+ mem = realloc(ptr, size);
}
if (!mem) {
rb_memerror();
@@ -623,7 +622,7 @@ vm_xfree(rb_objspace_t *objspace, void *ptr)
objspace->malloc_params.allocations--;
#endif
- RUBY_CRITICAL(free(ptr));
+ free(ptr);
}
void *
@@ -772,15 +771,15 @@ allocate_heaps(rb_objspace_t *objspace, size_t next_heaps_length)
size_t size;
size = next_heaps_length*sizeof(struct heaps_slot);
- RUBY_CRITICAL(
- if (heaps_used > 0) {
- p = (struct heaps_slot *)realloc(heaps, size);
- if (p) heaps = p;
- }
- else {
- p = heaps = (struct heaps_slot *)malloc(size);
- }
- );
+
+ if (heaps_used > 0) {
+ p = (struct heaps_slot *)realloc(heaps, size);
+ if (p) heaps = p;
+ }
+ else {
+ p = heaps = (struct heaps_slot *)malloc(size);
+ }
+
if (p == 0) {
during_gc = 0;
rb_memerror();
@@ -796,7 +795,8 @@ assign_heap_slot(rb_objspace_t *objspace)
int objs;
objs = HEAP_OBJ_LIMIT;
- RUBY_CRITICAL(p = (RVALUE*)malloc(HEAP_SIZE));
+ p = (RVALUE*)malloc(HEAP_SIZE);
+
if (p == 0) {
during_gc = 0;
rb_memerror();