Hm, so you mean something along this?
var linePtr: seq[pointer]
var input = memfiles.open("file.txt", mode = fmRead)
for line in memSlices(input):
linePtr.add(line.data)
Run
and then i divide the length of linePtr by my core count. This gives me the
size of each block.
Now i don't really understand how i can use that information to get actual
strings out of my memory mapped file. Mapping portions of the file only works
in multiples of the PAGE_SIZE of my OS says the docs. This means i need to
floor my chunk size to the nearest multiple of that? and if so how can i work
on the text like i would on strings?
Thanks for your help :)