diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-14 17:11:39 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-14 17:11:39 +0000 |
| commit | 91fee1b40daa86f2d5caaa62d29568b8ba21a26c (patch) | |
| tree | b7193754b13e9eafa95af0c11fea3ed17fea49fd /st.c | |
| parent | 6c8745cb7786e6a15860320229a0ec6ee2c71300 (diff) | |
| download | ruby-91fee1b40daa86f2d5caaa62d29568b8ba21a26c.tar.gz ruby-91fee1b40daa86f2d5caaa62d29568b8ba21a26c.tar.xz ruby-91fee1b40daa86f2d5caaa62d29568b8ba21a26c.zip | |
* st.c (malloc): use xmalloc/xcalloc instead of plain
malloc/calloc, to detect memory allocation failure. see
<http://www.nongnu.org/failmalloc/>.
* gc.c (rb_memerror): should not raise nomem_error.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -48,6 +48,11 @@ static struct st_hash_type type_strhash = { static void rehash(st_table *); +#ifdef RUBY +#define malloc xmalloc +#define calloc xcalloc +#endif + #define alloc(type) (type*)malloc((unsigned)sizeof(type)) #define Calloc(n,s) (char*)calloc((n),(s)) |
