Loading ...
Sorry, an error occurred while loading the content.

sizeof in OCaml

Expand Messages
  • magesh_kannan
    Hi All, I need to find the memory size of any arbitrary OCaml object of any type: int, record, list etc. I am currently using Marshal.to_string to flatten
    Message 1 of 1 , Aug 2, 2002
    • 0 Attachment
      Hi All,

      I need to find the memory size of any arbitrary OCaml object of any
      type: int, record, list etc. I am currently using 'Marshal.to_string'
      to flatten the data structure to a string and then using
      'Marshal.total_size' to get the size. Is there a faster way to do this
      than flattening the data structure?

      Thanks,
      Magesh
    Your message has been successfully submitted and would be delivered to recipients shortly.