hi miller, hi list,
i'm currently thinking about working on the memory allocation functions of pd to make them realtime safe ...
miller: are you planing to work on that in the near future? if so, it wouldn't be useful to reinvent the wheel twice ... if not, i'd start to work on that ...
i thought about some kind of allocation function that allocates memory in the background and assignes pieces of this memory using getbytes() ... a helper thread could allocate memory from the os and always have a few mb as memory ... probably i would have to add a garbage collector and stuff like that, too, but it seems to be an approach that _could_ work and make memory allocation a lot faster ...
and i'd like to know, what other people think of this idea, maybe i'm on the wrong way ...
cheers... tim
Hi Tim, have you done some profiling whether this is really necessary? I'm not sure if a self-written memory allocator will really be better than the one in the c library.
best greetings, Thomas
----- Original Message ----- From: "Tim Blechmann" TimBlechmann@gmx.net To: pd-dev@iem.at; msp@ucsd.edu Sent: Wednesday, August 04, 2004 12:24 AM Subject: [PD-dev] memory allocation
hi miller, hi list,
i'm currently thinking about working on the memory allocation functions of pd to make them realtime safe ...
miller: are you planing to work on that in the near future? if so, it wouldn't be useful to reinvent the wheel twice ... if not, i'd start to work on that ...
i thought about some kind of allocation function that allocates memory in the background and assignes pieces of this memory using getbytes() ... a helper thread could allocate memory from the os and always have a few mb as memory ... probably i would have to add a garbage collector and stuff like that, too, but it seems to be an approach that _could_ work and make memory allocation a lot faster ...
and i'd like to know, what other people think of this idea, maybe i'm on the wrong way ...
cheers... tim
-- mailto:TimBlechmann@gmx.de ICQ: 96771783
After one look at this planet any visitor from outer space would say "I want to see the manager." William S. Burroughs
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
have you done some profiling whether this is really necessary? I'm not sure if a self-written memory allocator will really be better than the one in the c library.
i'm not concerned about the allocation of only a few bytes, but of larger sample buffers, bigger than a few kb ... this may cause the dsp to stutter ... if we have this memory already allocated, it's already represented by physical memory (if we use memlocks) so we would only have to assign a pointer from our memory block(s)...
cheers... tim