Skip to content

Commit

Permalink
Change the default stack size to safe values on OpenBSD.
Browse files Browse the repository at this point in the history
With this patch racket will never grow beyond of the defaults limits of
the OS and also it doesn't limit the stack size to a fixed value.

Merge to v5.3.4
  • Loading branch information
juanfra684 authored and mflatt committed Apr 17, 2013
1 parent 75d9718 commit 5a56677
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/racket/sconfig.h
Expand Up @@ -313,15 +313,21 @@
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-openbsd"
# endif

/* Same reason as for FreeBSD? */
# define ASSUME_FIXED_STACK_SIZE
# define FIXED_STACK_SIZE 1048576
# include <sys/param.h>
# if OpenBSD < 201211
/* This is needed for (pre-5.2) userspace threads: */
# define ASSUME_FIXED_STACK_SIZE
# define FIXED_STACK_SIZE 1048576
# endif

# include "uconfig.h"
# undef HAS_STANDARD_IOB

# define HAS_BSD_IOB

/* Default UNIX_STACK_MAXIMUM is too big for a non-root user. */
# undef UNIX_STACK_MAXIMUM
# define UNIX_STACK_MAXIMUM 4194304

#ifndef __ELF__
# define UNDERSCORE_DYNLOAD_SYMBOL_PREFIX
#endif
Expand Down

0 comments on commit 5a56677

Please sign in to comment.