Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm #5

Open
effbiae opened this issue Nov 8, 2016 · 0 comments
Open

mm #5

effbiae opened this issue Nov 8, 2016 · 0 comments

Comments

@effbiae
Copy link

effbiae commented Nov 8, 2016

What is the best way to make sure my application memory management doesn't interfere with the speed (or function) of yaep's memory management?

I'm not sure the best way to work with your memory manager (OS_CREATE etc)...
yaep_parse has parse_alloc and parse_free functions (i read from yaep.txt that these functions are only used for the translation (*root) memory.

i note your test code (yaep.tst.in) defines

static void *
test_parse_alloc (int size)
{
  void *result;

  OS_TOP_EXPAND (mem_os, size);
  result = OS_TOP_BEGIN (mem_os);
  OS_TOP_FINISH (mem_os);
  return result;
}

and you pass yaep_parse and NULL for the yaep_parse functions

it seems you've optimized memory management and i don't feel as though i should use malloc/free in my own code in case i change your memory management characteristics.

but in the end, i'm going to link libyaep.a into code that uses malloc/realloc/free anyway, so...

what is the best way to make sure my application memory management doesn't interfere with the speed (or function) of yaep's memory management?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant