Sam Clegg
Sam Clegg
@warvstar so you are able to use webgpu from worker thread? I didn't realize that was currently possible. And in that case I guess #20124 break your codebase? I can...
If you know that memory doesn't need to be released and recycled then I think you can use `sbrk()` in parallel with malloc's use of `sbrk()`. You may need to...
> > If you know that memory doesn't need to be released and recycled then I think you can use `sbrk()` in parallel with malloc's use of `sbrk()`. You may...
> Looking at dlmalloc's implementation of calloc, it might be able to skip memset in this scenario, so we could switch mmap to use calloc with an element size of...
> @sbc100 yes, sorry, I probably should have caught this. WebGPU can be used from a worker - what we don't have is the ability to share anything between threads....
> > But can it be used from a worker with emscripten? I guess there are no tests for that? Would it depend on `OFFSCREENCANVAS_SUPPORT`? We can make it is...
Well I suppose step 1 is to start using `calloc` and step 2 would then be to try to improve the `calloc` of the various allocators where possible.
I think build-time is the only one that is simple for us to implement at this point.
> It looks like emscripten's implementation of the mimalloc primitives is not setting the is_zero flag, because it services page allocations via emmalloc:  I imagine @kripken could suggest a...
> The option I've been exploring on my end is a real mmap implementation, which would allow turning on dlmalloc and mimalloc's mmap support and automatically getting the zeroing optimizations....