<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>I needed some advise regarding ctrie implementation.</div><div><br></div><div>I was constructing the trie data structure which has to be operated from the address space mapped by mmap(2).</div><div>In place of “array of next nodes”, I am using “array of offsets”.</div><div>the void * returned from calling mmap(2), I would type cast it as my struct type.</div><div>When needing to write data, go to the last offset *(base + offset) and CAS.</div><div><br></div><div>I have doubts regarding “type” of offset, simply off_t or int.</div><div>As here we are mapping file memory into process address space, I m not certain what “type” would be safe to use for offsets.</div><div><br></div><div><br></div><div>Regards,</div><div>Mihir</div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
</blockquote></div></div></div>