Fixed-capacity vector utility class?

In my processBlock function, I’ve simply created a vector with an initial size, which should allocate heap memory.
I just re-tried by explicitly creating the vector itself on the heap as well:

	std::default_random_engine generator;
	std::uniform_int_distribution<int> distribution(1,6);
	int dice_roll = distribution(generator);

	auto *buf = new std::vector<float>(dice_roll);
	std::cout << buf->size();
	delete buf;

Still no complaints from pluginval.

Interesting, it seems to be that LTO in release build disables the operator new hooks.
If you run it in debug mode or with LTO turned off you should see the allocations.

I’ll try to see why this might be happening.

1 Like

Ok, got it. Looks like clang wasn’t exporting that symbol. If you grab the tip of the develop branch it should work: https://github.com/Tracktion/pluginval/commit/f25421d8278d55b1da63dbc4fafabb02730430d1

2 Likes