NEURON
memory.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // Some functions here are prepend with 'hoc_' but they are unrelated to hoc itself.
4 #include <cstddef>
5 
6 /* check return from malloc */
7 void* hoc_Emalloc(std::size_t n);
8 void* hoc_Ecalloc(std::size_t n, std::size_t size);
9 void* hoc_Erealloc(void* ptr, std::size_t size);
10 
11 void hoc_malchk(void);
12 
13 void* emalloc(std::size_t n);
14 void* ecalloc(std::size_t n, std::size_t size);
15 void* erealloc(void* ptr, std::size_t size);
16 
17 void* nrn_cacheline_alloc(void** memptr, std::size_t size);
18 void* nrn_cacheline_calloc(void** memptr, std::size_t nmemb, std::size_t size);
void * erealloc(void *ptr, std::size_t size)
Definition: memory.cpp:76
void * hoc_Ecalloc(std::size_t n, std::size_t size)
Definition: memory.cpp:30
void * emalloc(std::size_t n)
Definition: memory.cpp:60
void * nrn_cacheline_calloc(void **memptr, std::size_t nmemb, std::size_t size)
Definition: memory.cpp:103
void hoc_malchk(void)
Definition: memory.cpp:53
void * nrn_cacheline_alloc(void **memptr, std::size_t size)
Definition: memory.cpp:84
void * ecalloc(std::size_t n, std::size_t size)
Definition: memory.cpp:68
void * hoc_Emalloc(std::size_t n)
Definition: memory.cpp:22
void * hoc_Erealloc(void *ptr, std::size_t size)
Definition: memory.cpp:41
int const size_t const size_t n
Definition: nrngsl.h:10