Sam Clegg

Results 1106 comments of Sam Clegg
trafficstars

@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: ![image](https://private-user-images.githubusercontent.com/198130/327280839-f930588f-4b6f-4ec2-a955-8a7e1e185cec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQ2MTEyMjksIm5iZiI6MTcxNDYxMDkyOSwicGF0aCI6Ii8xOTgxMzAvMzI3MjgwODM5LWY5MzA1ODhmLTRiNmYtNGVjMi1hOTU1LThhN2UxZTE4NWNlYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNTAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDUwMlQwMDQ4NDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYjUyNDMxODY1YTcxY2NjYzI0MzQyYzFjMGFiZTZjZDYxMWIwNTEwNjE4Y2YzMmE1MzE1ODczYzAyNzg3ODAzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.OypyS5agyPykGZefKzUopOuhrl4OYVr4IawJCzOVoY8) 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....