5 #include "../neuron/model_data.hpp"
23 static auto& x = *
new std::vector<std::unique_ptr<DatumArrayPool>>{};
35 datumpools()[
type] = std::make_unique<DatumArrayPool>(1000, count);
40 for (
int i = 0;
i < count; ++
i) {
61 auto const count = datumpool->d2();
62 for (
auto i = 0;
i < count; ++
i) {
66 datumpool->hpfree(ppd);
76 "nrn_delete_mechanism_prop_datum(%d):"
77 " refusing to delete storage that still hosts"
111 if (pdatum && pdatum->nget() == 0) {
117 Printf(
"poolshrink --- type name (dbluse, size) (datumuse, size)\n");
121 Printf(
"%d %s (%ld, %d)\n",
124 (pdatum ? pdatum->nget() : 0),
125 (pdatum ? pdatum->size() : 0));
143 static_cast<CharArrayPool*
>(pool)->hpfree(
static_cast<char*
>(item));
void nrn_pool_free(void *pool, void *item)
Datum * nrn_prop_datum_alloc(int type, int count, Prop *p)
void nrn_prop_datum_free(int type, Datum *ppd)
void nrn_mk_prop_pools(int n)
static SectionPool * secpool_
void * nrn_pool_alloc(void *pool)
int nrn_mechanism_prop_datum_count(int type)
void * nrn_pool_create(long count, int itemsize)
int nrn_is_valid_section_ptr(void *v)
void nrn_pool_delete(void *pool)
Section * nrn_section_alloc()
static auto & datumpools()
ArrayPool< char > CharArrayPool
void nrn_pool_freeall(void *pool)
void nrn_poolshrink(int shrink)
void nrn_section_free(Section *s)
Pool< Section > SectionPool
void nrn_delete_mechanism_prop_datum(int type)
void hoc_execerr_ext(const char *fmt,...)
printf style specification of hoc_execerror message.
Model & model()
Access the global Model instance.
int const size_t const size_t n
std::vector< Memb_func > memb_func
Non-template stable handle to a generic value.
int Printf(const char *fmt, Args... args)