memory management for efficient resizing
Ideas:
- member functions in Function struct to provide malloc, realloc, free to ops, and auto-free all memory on Function destruction
- pro: works for this problem
- con: we need to tell output pyobjects to ref the Function if that's where the data lies
- add code blocks per op that will be inserted into the list of variable declarations, and into the destructor of the class, and into the constructor of the class
- pro: more flexible than above
- con: we need to tell output pyobjects to ref the Function if that's where the data lies
- pro: this would also parallel execution of ops as we could run there c_code without the gil.
- member functions in Function struct to provide malloc, realloc, free to ops, and auto-free all memory on Function destruction
- pro: works for this problem
- con: we need to tell output pyobjects to ref the Function if that's where the data lies
- add code blocks per op that will be inserted into the list of variable declarations, and into the destructor of the class, and into the constructor of the class
- pro: more flexible than above
- con: we need to tell output pyobjects to ref the Function if that's where the data lies
- pro: this would also parallel execution of ops as we could run there c_code without the gil.
Leave a comment