diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-11 20:35:40 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-11 20:35:40 +0100 |
| commit | 51d4356e5466aa4295360d107d6af2ac0ff65aa7 (patch) | |
| tree | 50e7a759b6121488093a01ed1e2a975521847fc2 /src/server | |
| parent | fcd0bd7e8924273ded0b5bb0f85e38735437786f (diff) | |
| download | chawan-51d4356e5466aa4295360d107d6af2ac0ff65aa7.tar.gz | |
loader: fix loader buffer page size optimization
The goal is to get "SmallChunk" pages from the allocator.
I think I stole the idea from faststreams, but the overhead might be
different with raw pointers...
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/loader.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/loader.nim b/src/server/loader.nim index 76952eab..474700df 100644 --- a/src/server/loader.nim +++ b/src/server/loader.nim @@ -49,7 +49,11 @@ import types/referrer import types/url import utils/twtstr -const LoaderBufferPageSize = 4064 # 4096 - 32 +# Try to make it a SmallChunk. +# We must subtract SmallChunk size, and then FreeCell size. +# (See system/alloc.nim for details.) +#TODO measure this on 32-bit too, we get a few more bytes there +const LoaderBufferPageSize = 4016 # 4096 - 64 - 16 type LoaderBufferObj = object |