unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] On Hurd, don't use not implemented madvise()
@ 2017-05-30  9:26 manolis837
  2017-05-30 19:41 ` Mark H Weaver
  0 siblings, 1 reply; 13+ messages in thread
From: manolis837 @ 2017-05-30  9:26 UTC (permalink / raw)
  To: guile-devel

From: Manolis Ragkousis <manolis837@gmail.com>

On Hurd, because madvise() is not implemented we disable it.

* libguile/vm.c (return_unused_stack_to_os): Don't use madvise() on Hurd.
---
 libguile/vm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libguile/vm.c b/libguile/vm.c
index 18f219249..7089f23c7 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -896,6 +896,8 @@ return_unused_stack_to_os (struct scm_vm *vp)
 
   /* Return these pages to the OS.  The next time they are paged in,
      they will be zeroed.  */
+#if !defined __gnu_hurd__
+  /* madvise() is not implemented on GNU Hurd. */
   if (lo < hi)
     {
       int ret = 0;
@@ -907,7 +909,7 @@ return_unused_stack_to_os (struct scm_vm *vp)
       if (ret)
         perror ("madvise failed");
     }
-
+#endif
   vp->sp_min_since_gc = vp->sp;
 #endif
 }
-- 
2.13.0




^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-02 18:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-30  9:26 [PATCH] On Hurd, don't use not implemented madvise() manolis837
2017-05-30 19:41 ` Mark H Weaver
2017-06-01 16:27   ` Manolis Ragkousis
2017-06-01 23:29     ` Mark H Weaver
2017-06-02  8:39       ` tomas
2017-06-03  2:00         ` Mark H Weaver
2017-06-03  6:41           ` tomas
2017-06-08 17:27           ` Efficiency of `map` (was: [PATCH] On Hurd, don't use not implemented madvise()) Stefan Monnier
2017-06-10  4:28             ` Efficiency of `map` Mark H Weaver
2017-06-10  4:38               ` Nala Ginrut
2017-06-11  5:27                 ` Mark H Weaver
2017-07-02 18:57       ` [PATCH] On Hurd, silently ignore ENOSYS for madvise() manolis837
2017-07-02 18:57         ` manolis837

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).