Is the number of allocated bytes reported by time accurate?
Marc: I get > (time (##bignum.make 2 #f #f)) (time (##bignum.make 2 #f #f)) 0 ms real time 0 ms cpu time (0 user, 0 system) no collections 48 bytes allocated no minor faults no major faults 4344 > (time (cons a b)) (time (cons a b)) 0 ms real time 0 ms cpu time (0 user, 0 system) no collections 48 bytes allocated 1 minor fault no major faults on a 64-bit machine; I would expect each of them to allocate 24 bytes (two a-digits and a tag in the first one, two slots and a tag in the second). So, can you explain what's going on? Brad
Afficher les réponses par date
On Apr 24, 2014, at 3:58 PM, Bradley Lucier <lucier@math.purdue.edu> wrote:
Marc:
I get
(time (##bignum.make 2 #f #f)) (time (##bignum.make 2 #f #f)) 0 ms real time 0 ms cpu time (0 user, 0 system) no collections 48 bytes allocated no minor faults no major faults 4344 (time (cons a b)) (time (cons a b)) 0 ms real time 0 ms cpu time (0 user, 0 system) no collections 48 bytes allocated 1 minor fault no major faults
on a 64-bit machine; I would expect each of them to allocate 24 bytes (two a-digits and a tag in the first one, two slots and a tag in the second).
So, can you explain what's going on?
Brad
We’ve been over this before… These objects are allocated as movable objects in the heap where 24 bytes are allocated in the fromspace and 24 bytes are allocated in the tospace. Its just a fair accounting of the space reserved for the object. Marc
Ah, yes. A bit confusing, though when writing code to minimize allocations. Thanks. Brad
On Apr 24, 2014, at 4:20 PM, Marc Feeley <feeley@iro.umontreal.ca> wrote:
On Apr 24, 2014, at 3:58 PM, Bradley Lucier <lucier@math.purdue.edu> wrote:
Marc:
I get
(time (##bignum.make 2 #f #f)) (time (##bignum.make 2 #f #f)) 0 ms real time 0 ms cpu time (0 user, 0 system) no collections 48 bytes allocated no minor faults no major faults 4344 (time (cons a b)) (time (cons a b)) 0 ms real time 0 ms cpu time (0 user, 0 system) no collections 48 bytes allocated 1 minor fault no major faults
on a 64-bit machine; I would expect each of them to allocate 24 bytes (two a-digits and a tag in the first one, two slots and a tag in the second).
So, can you explain what's going on?
Brad
We’ve been over this before… These objects are allocated as movable objects in the heap where 24 bytes are allocated in the fromspace and 24 bytes are allocated in the tospace. Its just a fair accounting of the space reserved for the object.
Marc
participants (2)
-
Bradley Lucier -
Marc Feeley