mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* gc.c (rb_gc_unprotect_logging): throw rb_memerror when it cannot
allocate memory. This is pointed out by Facebook's Infer. * gc.c (gc_prof_setup_new_record): ditto. * regparse.c (parse_regexp): ditto. * util.c (MALLOC): use xmalloc and xfree like above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6db71fb11a
commit
b3935f179b
4 changed files with 22 additions and 4 deletions
4
util.c
4
util.c
|
@ -748,12 +748,12 @@ ruby_getcwd(void)
|
|||
#ifdef MALLOC
|
||||
extern void *MALLOC(size_t);
|
||||
#else
|
||||
#define MALLOC malloc
|
||||
#define MALLOC xmalloc
|
||||
#endif
|
||||
#ifdef FREE
|
||||
extern void FREE(void*);
|
||||
#else
|
||||
#define FREE free
|
||||
#define FREE xfree
|
||||
#endif
|
||||
|
||||
#ifndef Omit_Private_Memory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue