Browse thread
[Caml-list] "Nasty" functions and memory usage
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Xavier Leroy <Xavier.Leroy@i...> |
| Subject: | Re: [Caml-list] "Nasty" functions and memory usage |
> So how can the memory usage of the ocaml interpreter be constant
> at 2200Kb?
It can be that it is traversing a data structure with lots of
sharing, while not allocating any long-lived data structure.
Consider for instance the following type:
*
/ \
\ /
*
/ \
...
\ /
*
/ \
'a 'b
It uses little memory, but a full (tree) traversal of it will take
a lot of time.
- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr