… | |
… | |
37 | #include <material.h> |
37 | #include <material.h> |
38 | |
38 | |
39 | #include <glib.h> |
39 | #include <glib.h> |
40 | |
40 | |
41 | refcnt_base::refcnt_t refcnt_dummy; |
41 | refcnt_base::refcnt_t refcnt_dummy; |
42 | |
42 | size_t slice_alloc; |
43 | rand_gen rndm; |
43 | rand_gen rndm; |
44 | |
44 | |
45 | void |
45 | void |
46 | tausworthe_random_generator::seed (uint32_t seed) |
46 | tausworthe_random_generator::seed (uint32_t seed) |
47 | { |
47 | { |
… | |
… | |
472 | void *salloc_ (int n) throw (std::bad_alloc) |
472 | void *salloc_ (int n) throw (std::bad_alloc) |
473 | { |
473 | { |
474 | #ifdef PREFER_MALLOC |
474 | #ifdef PREFER_MALLOC |
475 | void *ptr = malloc (n); |
475 | void *ptr = malloc (n); |
476 | #else |
476 | #else |
|
|
477 | slice_alloc += n; |
477 | void *ptr = g_slice_alloc (n); |
478 | void *ptr = g_slice_alloc (n); |
478 | #endif |
479 | #endif |
479 | |
480 | |
480 | if (!ptr) |
481 | if (!ptr) |
481 | throw std::bad_alloc (); |
482 | throw std::bad_alloc (); |
… | |
… | |
607 | 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, |
608 | 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, |
608 | 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, |
609 | 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, |
609 | 0x2d02ef8dL |
610 | 0x2d02ef8dL |
610 | }; |
611 | }; |
611 | |
612 | |
612 | #if 0 |
|
|
613 | void xyzzy (object_ptr &a, object_ptr &o) |
|
|
614 | { |
|
|
615 | asm volatile ("int3"); |
|
|
616 | a = o; |
|
|
617 | asm volatile ("int3"); |
|
|
618 | } |
|
|
619 | #endif |
|
|
620 | |
|
|