Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

..."request-based memory arena"...

there are some very questionable things going on with the memory handing in this code. just saying.



Request-based memory arenas are pretty standard for web servers!


Maybe be, after all - I dont write web servers (btw, the PQ and JQ libraries doesnt seem to use the arena allocator, which makes the whole proposition a bit dubious, but lets say that its me being picky).

What I meant was, that IMO the code is not very robust when dealing with memory allocations:

1. The "string builder" for example silently ignores allocation failures and just happily returns - https://github.com/williamcotton/webdsl/blob/92762fb724a9035...

2. In what seems most of the places, the code simply doesnt check for allocation failures, which leads to overruns (just couple of examples):

https://github.com/williamcotton/webdsl/blob/92762fb724a9035...

https://github.com/williamcotton/webdsl/blob/92762fb724a9035...


Thanks for digging in. Yup, those two libs don’t support custom allocators. I raised an issue in the jq repo to ask if they thought about adding it.

Great points about happy path allocations. If I ever touch the project again I’ll check each location.

Note to self: free code reviews of projects if you mention LLMs!


"People took a cursory look at a codebase I published and found glaring mistakes they discussed publicly as examples of how bad it is" is not the flex you think it is.


"Cursory", get it? I did indeed make it with Cursor! ;)

I hope you find yourself having a better day today than yesterday.


I hope you stop peddling AI slop




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: