incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <>
Subject measures hierarchy
Date Tue, 14 Feb 2012 21:55:49 GMT
Hi *,

actually Sizing has the following hierarchy:

 - Sizing
      `- Heap
      `- Memory
      `- Ram
      `- Space

what I see in the current codebase is that extension classes don't add
any semantic, I mean calling {{Ram.inKb( size )}} is exactly the same
of calling {{Space.inKb( size )}}... users can safety exchange them
without any risk to have a compilation failure, so... what is the
advantage of keeping multiple implementations of same methods?

For what I can see, we can happily living with {{Sizing}} - maybe
renaming it to {{Memory}} that sounds more self-explaining...

OTOH, in the case we want to work with more semantic, it would be
different if each method in each class would return a declaring class
object, I mean:

    Ram inKb( size )

instead of

    int inKb( size )

Of course, I assume some methods should be modified to accept the right type...

Many thanks in advance, all the best!

View raw message