ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.xs
(Generate patch)

Comparing Coro/Coro/State.xs (file contents):
Revision 1.420 by root, Fri Apr 13 10:53:25 2012 UTC vs.
Revision 1.421 by root, Sun May 27 16:36:05 2012 UTC

1504 size_t stack_size; 1504 size_t stack_size;
1505 1505
1506#if HAVE_MMAP 1506#if HAVE_MMAP
1507 cctx->ssize = ((cctx_stacksize * sizeof (long) + PAGESIZE - 1) / PAGESIZE + CORO_STACKGUARD) * PAGESIZE; 1507 cctx->ssize = ((cctx_stacksize * sizeof (long) + PAGESIZE - 1) / PAGESIZE + CORO_STACKGUARD) * PAGESIZE;
1508 /* mmap supposedly does allocate-on-write for us */ 1508 /* mmap supposedly does allocate-on-write for us */
1509 cctx->sptr = mmap (0, cctx->ssize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS, 0, 0); 1509 cctx->sptr = mmap (0, cctx->ssize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANONYMOUS, -1, 0);
1510 1510
1511 if (cctx->sptr != (void *)-1) 1511 if (cctx->sptr != (void *)-1)
1512 { 1512 {
1513 #if CORO_STACKGUARD 1513 #if CORO_STACKGUARD
1514 mprotect (cctx->sptr, CORO_STACKGUARD * PAGESIZE, PROT_NONE); 1514 mprotect (cctx->sptr, CORO_STACKGUARD * PAGESIZE, PROT_NONE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines