okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
e4803b3
main
1%% What a spawn or send copies: the heap words of a process whose closure 2%% holds Term. A term read from a persistent term is a literal and costs none. 3- module ( albedo_copy_test_support ). 4 5- export ([ captured_words / 1 ]). 6 7captured_words ( Term ) -> 8Self = self (), 9Pid = spawn ( fun () -> Self ! { ready , self ()}, receive go -> Term end end ), 10receive { ready , Pid } -> ok end , 11{ total_heap_size , Words } = process_info ( Pid , total_heap_size ), 12Pid ! go , 13Words .