You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for making this increadible lib.
I tried to create 50M entities with prefabs but got error: fatal: allocator.c: 52: assert: size >= 0 INTERNAL_ERROR when program is finished.
To Reproduce
#include <flecs.h>
#include <iostream>
struct Position {
float x, y, z;
};
struct Velocity {
float vx, vy, vz;
};
int main(int argc, char *argv[]) {
flecs::world ecs(argc, argv);
auto person_prefab = ecs.prefab("PersonPrefab")
.set<Position>({0, 0, 0})
.set<Velocity>({0, 0, 0});
for (int i = 0; i < 50000000; i++) {
ecs.entity()
.is_a(person_prefab)
.add<Position>()
.set<Position>({static_cast<float>(i), 0, 0});
}
std::cout << "Created 50,000,000 entities" << std::endl;
return 0;
}
Describe the bug
Hi,
Thanks for making this increadible lib.
I tried to create 50M entities with prefabs but got error: fatal: allocator.c: 52: assert: size >= 0 INTERNAL_ERROR when program is finished.
To Reproduce
it gave error:
The error is after created entities but before the return line. It works fine for smaller number like 5M entities.
Btw, is this the correct way to use prefab?
Expected behavior
Should return no error
Additional context
My specs is M3 base 24GB RAM. Free RAM is around 20% when running the code.
The text was updated successfully, but these errors were encountered: