Mercurial > hg > xemacs-beta
comparison src/vdb.c @ 4123:5333f383efbd
[xemacs-hg @ 2007-08-17 08:04:25 by crestani]
2007-08-15 Marcus Crestani <crestani@xemacs.org>
* input-method-xlib.c (EmacsFreeXIMStyles):
* lisp.h:
* process-unix.c (connect_to_file_descriptor):
* process-unix.c (create_bidirectional_pipe):
* process-unix.c (unix_create_process):
* process-unix.c (unix_open_network_stream):
* process-unix.c (unix_open_multicast_group): Convert pointers to
EMACS_INTs instead of ints.
* vdb.c (Ftest_vdb): Print adresses as pointers.
author | crestani |
---|---|
date | Fri, 17 Aug 2007 08:04:28 +0000 |
parents | 229bd619740a |
children | f395ee7ad844 |
comparison
equal
deleted
inserted
replaced
4122:8fea628c26fb | 4123:5333f383efbd |
---|---|
88 | 88 |
89 /* Allocate a buffer; it will have the default | 89 /* Allocate a buffer; it will have the default |
90 protection of PROT_READ|PROT_WRITE. */ | 90 protection of PROT_READ|PROT_WRITE. */ |
91 p = (Rawbyte *) mc_alloc (mc_get_page_size()); | 91 p = (Rawbyte *) mc_alloc (mc_get_page_size()); |
92 set_lheader_implementation ((struct lrecord_header *) p, &lrecord_cons); | 92 set_lheader_implementation ((struct lrecord_header *) p, &lrecord_cons); |
93 fprintf (stderr, "Allocate p: [%x ... %x], length %d\n", | 93 fprintf (stderr, "Allocate p: [%p ... %p], length %d\n", |
94 (int) p, (int) (p + mc_get_page_size ()), | 94 p, p + mc_get_page_size (), (int) mc_get_page_size ()); |
95 (int) mc_get_page_size ()); | |
96 | 95 |
97 /* Test read. */ | 96 /* Test read. */ |
98 fprintf (stderr, "Attempt to read p[666]... "); | 97 fprintf (stderr, "Attempt to read p[666]... "); |
99 c = p[666]; | 98 c = p[666]; |
100 fprintf (stderr, "read ok.\n"); | 99 fprintf (stderr, "read ok.\n"); |
124 write_barrier_enabled = 0; | 123 write_barrier_enabled = 0; |
125 MARK_WHITE (p); | 124 MARK_WHITE (p); |
126 vdb_unprotect (p, mc_get_page_size ()); | 125 vdb_unprotect (p, mc_get_page_size ()); |
127 for (count = Dynarr_length (page_fault_table); count; count--) | 126 for (count = Dynarr_length (page_fault_table); count; count--) |
128 if (Dynarr_at (page_fault_table, count - 1) == &p[666]) | 127 if (Dynarr_at (page_fault_table, count - 1) == &p[666]) |
129 fprintf (stderr, "VALID page fault at %x\n", | 128 fprintf (stderr, "VALID page fault at %p\n", |
130 (int) Dynarr_at (page_fault_table, count - 1)); | 129 Dynarr_at (page_fault_table, count - 1)); |
131 else | 130 else |
132 fprintf (stderr, "WRONG page fault at %x\n", | 131 fprintf (stderr, "WRONG page fault at %p\n", |
133 (int) Dynarr_at (page_fault_table, count - 1)); | 132 Dynarr_at (page_fault_table, count - 1)); |
134 Dynarr_free (page_fault_table); | 133 Dynarr_free (page_fault_table); |
135 return Qnil; | 134 return Qnil; |
136 } | 135 } |
137 | 136 |
138 DEFUN ("test-segfault", Ftest_segfault, 0, 0, "", /* | 137 DEFUN ("test-segfault", Ftest_segfault, 0, 0, "", /* |