ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.45k stars 41 forks source link

Error when creating a lot of tmp files #618

Closed MinmoTech closed 1 year ago

MinmoTech commented 1 year ago

I get this error a lot when using curl in a program that spawns a lot of threads:

ngs: /home/user/.cache/paru/clone/ngs-lang/src/ngs-0.2.14/malloc.c:37: ngs_malloc: Assertion `ngs_malloc_next_free - ngs_malloc_base + sizeof(size_t) + size < ngs_malloc_allocated' failed.

This is a minimal example that causes the problem:

arr = 0 .. 1000000
arr.map( {
    path = TmpFile()
})
ilyash-b commented 1 year ago

Fixed in dev branch