#include <stdio.h>
#include <signal.h>
+#include <string.h>
#include "runtime.h"
#include "sbcl.h"
#include "os.h"
{
int tag;
lispobj *new;
- lispobj *source, *dest;
gc_assert(is_lisp_pointer(object));
gc_assert(from_space_p(object));
/* Allocate space. */
new = gc_general_alloc(nwords*4,ALLOC_BOXED,ALLOC_QUICK);
- dest = new;
- source = (lispobj *) native_pointer(object);
-
/* Copy the object. */
- while (nwords > 0) {
- dest[0] = source[0];
- dest[1] = source[1];
- dest += 2;
- source += 2;
- nwords -= 2;
- }
-
+ memcpy(new,native_pointer(object),nwords*4);
return make_lispobj(new,tag);
}
/* FIXME: Most calls end up going to some trouble to compute an
* 'n_words' value for this function. The system might be a little
* simpler if this function used an 'end' parameter instead. */
-
void
scavenge(lispobj *start, long n_words)
{
lispobj *end = start + n_words;
lispobj *object_ptr;
int n_words_scavenged;
-
for (object_ptr = start;
object_ptr < end;
object_ptr += n_words_scavenged) {
/* fix self pointer. */
nfheaderp->self =
-#ifdef LISP_FEATURE_GENCGC /* GENCGC? Maybe x86 is better conditional */
+#ifdef LISP_FEATURE_X86
FUN_RAW_ADDR_OFFSET +
#endif
nfheaderl;