~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/runtime/linux/mem.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
                if(p != v && addrspace_free(v, n)) {
92
92
                        // On some systems, mmap ignores v without
93
93
                        // MAP_FIXED, so retry if the address space is free.
 
94
                        if(p > (void*)4096) {
 
95
                                runtime·munmap(p, n);
 
96
                        }
94
97
                        p = runtime·mmap(v, n, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_FIXED|MAP_PRIVATE, -1, 0);
95
98
                }
96
99
                if(p == (void*)ENOMEM)