1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

sample: refactor sample_alloc_mem() -> sample_alloc_heap()

This commit is contained in:
Steffen Vogel 2021-06-27 17:38:09 -04:00
parent e524dcbdd0
commit 57495543a9
4 changed files with 4 additions and 4 deletions

View file

@ -102,7 +102,7 @@ struct sample {
struct sample * sample_alloc(struct pool *p);
/** Allocate a new sample from the heap. */
struct sample * sample_alloc_mem(int capacity);
struct sample * sample_alloc_heap(int capacity);
/** Allocate a new sample from the same pool as \p smp and copy its content */
struct sample * sample_clone(struct sample *smp);

View file

@ -321,7 +321,7 @@ int file_start(struct vnode *n)
rewind(f->stream_in);
/* Fast-forward */
struct sample *smp = sample_alloc_mem(vlist_length(&n->in.signals));
struct sample *smp = sample_alloc_heap(vlist_length(&n->in.signals));
for (unsigned i = 0; i < f->skip_lines; i++)
f->formatter->scan(f->stream_in, smp);

View file

@ -62,7 +62,7 @@ struct sample * sample_alloc(struct pool *p)
return s;
}
struct sample * sample_alloc_mem(int capacity)
struct sample * sample_alloc_heap(int capacity)
{
size_t sz = SAMPLE_LENGTH(capacity);

View file

@ -143,7 +143,7 @@ protected:
dirs[i].formatter->start(dtypes);
}
struct sample *smp = sample_alloc_mem(DEFAULT_SAMPLE_LENGTH);
struct sample *smp = sample_alloc_heap(DEFAULT_SAMPLE_LENGTH);
while (true) {
ret = dirs[0].formatter->scan(stdin, smp);