[ndnSIM] Size of PIT in KB?

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Thu Nov 3 18:57:54 PDT 2016


Hi,

there is a “size” method for each structure, however, this returns the number of entries for each one.

To get the size in KB, you have to do the math and figure out how many bytes are allocated for each entry of a structure. Every time that a new entry is created, you add the size of the entry to a variable representing the overall structure size in KB, every time an existing entry is deleted, you subtract from this variable.

And, yes, for the names that you mentioned, different amounts of memory have to be allocated. That has to do with the fact that they do not have the same number of name components. It might also have to do with the fact that each name component has a different number of characters (do not remember the very low-level details of the library. For each component, the library might allocate a fixed amount of memory no matter how many chars there are in the name component and does proper resizing in the case that the characters require more memory, but again I am not sure about that).

Hope that this helps,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA


> On Nov 3, 2016, at 6:13 PM, Hwang In Chan <neogeoss1 at gmail.com> wrote:
> 
> Dear NDN researchers,
> 
> As far as I investigate, all the names of FIB and PIT are stored in the name tree data structure.
> Is there anyway to measure it while running NDNSIM?
> Since they are all stored in the same structure, can I know the separate sizes of those FIB and PIT in KB?
> 
> In addition, if there are two different names, such as "AB/V", "ABCD/DFDS/DFDG"
> Do they take up a different amount of memory?
> 
> Best wishes,
> 
> inchan hwang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161103/731be7bf/attachment.html>


More information about the ndnSIM mailing list