Memory allocation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Batista, Facundo

    Memory allocation

    How could I know how much memory uses an object?

    Something like:
    [color=blue][color=green]
    >> a = [66]
    >> memused(a)[/color][/color]
    n

    Thanks!


    Facundo Batista
    Gestión de Red
    fbatista@unifon .com.ar
    (54 11) 5130-4643
    Cel: 15 5132 0132



  • Peter Hansen

    #2
    Re: Memory allocation

    "Batista, Facundo" wrote:[color=blue]
    >
    > How could I know how much memory uses an object?
    >
    > Something like:
    >[color=green][color=darkred]
    > >> a = [66]
    > >> memused(a)[/color][/color]
    > n[/color]

    Can you provide more background on the specific problem you need
    to solve, or are you looking for a very general solution? In
    other words, do you just need to know how much memory a list, or
    an integer uses up, or do you think you need a general-purpose
    function which works with any object of any type.

    And in the above example, would you be interested in the memory
    used by the integer 66, or the memory used by the list that contains
    a reference to that integer, or the combined total?

    -Peter

    Comment

    Working...