#Dynamic Buffers

1 messages · Page 1 of 1 (latest)

solar bough
#

Where are dynamic buffers allocated and how? Is it using UnsafeUtilities.Malloc?

late grail
#

I know that it’s Allocated in the chunk if it’s within the size you declared with the attribute for buffer size

#

And outside the chunk if the size extends beyond that, but not entirely sure on exact technical implementation

worldly heath
#

Outside of chunk just does a normal malloc(persistent)

solar bough
solar bough
#

I don`t really like how adding to dynamic buffers need a sync point. Is it true that it needs a sync point?

worldly heath
#

unless you mean on main thread?

#

in which case it needs to sync any job using it

solar bough
#

Don`t it execute on main thread always? even if on job it is using CommandBuffers that execute on main thread

worldly heath
#

If you're just adding to a dynamicbuffer in a job there's no command buffer or main thread

solar bough
#

If i don`t need to bake it

worldly heath
#

why would you use an unsafe list instead of a dynamic buffer?

#

you have to manage the memory

#

if you dispose the entity, how do you clean up the unsafe list memory