1#ifndef RBIMPL_XMALLOC_H
2#define RBIMPL_XMALLOC_H
23#include "ruby/internal/config.h"
49#ifndef USE_GC_MALLOC_OBJ_INFO_DETAILS
50# define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
53#define xmalloc ruby_xmalloc
54#define xmalloc2 ruby_xmalloc2
55#define xcalloc ruby_xcalloc
56#define xrealloc ruby_xrealloc
57#define xrealloc2 ruby_xrealloc2
58#define xfree ruby_xfree
86void *ruby_xmalloc(
size_t size)
117void *ruby_xmalloc2(
size_t nelems,
size_t elemsiz)
147void *ruby_xcalloc(
size_t nelems,
size_t elemsiz)
193void *ruby_xrealloc(
void *ptr,
size_t newsiz)
250void *ruby_xrealloc2(
void *ptr,
size_t newelems,
size_t newsiz)
282void ruby_xfree(
void *ptr)
Defines RBIMPL_ATTR_ALLOC_SIZE.
#define RBIMPL_ATTR_ALLOC_SIZE(tuple)
Wraps (or simulates) __attribute__((alloc_size))
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Defines RBIMPL_ATTR_NODISCARD.
#define RBIMPL_ATTR_NODISCARD()
Wraps (or simulates) [[nodiscard]].
Defines RBIMPL_ATTR_NOEXCEPT.
#define RBIMPL_ATTR_NOEXCEPT(_)
Wraps (or simulates) C++11 noexcept
Defines RBIMPL_ATTR_RESTRICT.
#define RBIMPL_ATTR_RESTRICT()
Wraps (or simulates) __declspec(restrict)
Defines RBIMPL_ATTR_RETURNS_NONNULL.
#define RBIMPL_ATTR_RETURNS_NONNULL()
Wraps (or simulates) __attribute__((returns_nonnull))