hnes / libaco

A blazing fast and lightweight C asymmetric coroutine library 💎 ⛅🚀⛅🌞
https://libaco.org
Apache License 2.0
3.5k stars 391 forks source link

Adjust code around memory allocations #3

Open elfring opened 6 years ago

elfring commented 6 years ago

The following source code structure is repeated a few times.

…
    …* p = malloc(…);
    assertalloc_ptr(p);
…

How do you think about to combine it into a function like “aco_malloc” (or “aco_calloc”)?

hnes commented 6 years ago

Thanks Markus for your proposal :D

I would like to add it to the ToDo list and this adjustment will be released with the new API aco_reset in the future v1.3.0.