@@ -1,4 +1,4 @@
-f4470a54e6db
+3cdba7b0650c
The first line of this file holds the Mercurial revision number of the
last merge done from the master library sources.
@@ -813,6 +813,7 @@
go/net/rpc/server.go
go_runtime_files = \
+ go/runtime/compiler.go \
go/runtime/debug.go \
go/runtime/error.go \
go/runtime/extern.go \
@@ -843,6 +844,7 @@
go/strconv/decimal.go \
go/strconv/extfloat.go \
go/strconv/ftoa.go \
+ go/strconv/isprint.go \
go/strconv/itoa.go \
go/strconv/quote.go
@@ -1000,12 +1002,13 @@
go/crypto/tls/handshake_server.go \
go/crypto/tls/key_agreement.go \
go/crypto/tls/prf.go \
- go/crypto/tls/root_unix.go \
go/crypto/tls/tls.go
go_crypto_x509_files = \
go/crypto/x509/cert_pool.go \
go/crypto/x509/pkcs1.go \
go/crypto/x509/pkcs8.go \
+ go/crypto/x509/root.go \
+ go/crypto/x509/root_unix.go \
go/crypto/x509/verify.go \
go/crypto/x509/x509.go
@@ -1320,7 +1323,8 @@
go_path_filepath_files = \
go/path/filepath/match.go \
go/path/filepath/path.go \
- go/path/filepath/path_unix.go
+ go/path/filepath/path_unix.go \
+ go/path/filepath/symlink.go
go_regexp_syntax_files = \
go/regexp/syntax/compile.go \
@@ -390,6 +390,23 @@
{
byte *p;
+
+ if(n > (uintptr)(h->arena_end - h->arena_used)) {
+ // We are in 32-bit mode, maybe we didn't use all possible address space yet.
+ // Reserve some more space.
+ byte *new_end;
+ uintptr needed;
+
+ needed = (uintptr)h->arena_used + n - (uintptr)h->arena_end;
+ // Round wanted arena size to a multiple of 256MB.
+ needed = (needed + (256<<20) - 1) & ~((256<<20)-1);
+ new_end = h->arena_end + needed;
+ if(new_end <= h->arena_start + MaxArena32) {
+ p = runtime_SysReserve(h->arena_end, new_end - h->arena_end);
+ if(p == h->arena_end)
+ h->arena_end = new_end;
+ }
+ }
if(n <= (uintptr)(h->arena_end - h->arena_used)) {
// Keep taking from our reservation.
p = h->arena_used;
@@ -411,7 +428,8 @@
return nil;
if(p < h->arena_start || (uintptr)(p+n - h->arena_start) >= MaxArena32) {
- runtime_printf("runtime: memory allocated by OS not in usable range\n");
+ runtime_printf("runtime: memory allocated by OS (%p) not in usable range [%p,%p)\n",
+ p, h->arena_start, h->arena_start+MaxArena32);
runtime_SysFree(p, n);
return nil;
}
@@ -406,7 +406,9 @@
n = maxgomaxprocs;
runtime_gomaxprocs = n;
}
- setmcpumax(runtime_gomaxprocs);
+ // wait for the main goroutine to start before taking
+ // GOMAXPROCS into account.
+ setmcpumax(1);
runtime_singleproc = runtime_gomaxprocs == 1;
canaddmcpu(); // mcpu++ to account for bootstrap m
@@ -432,6 +434,8 @@
// by calling runtime.LockOSThread during initialization
// to preserve the lock.
runtime_LockOSThread();
+ // From now on, newgoroutines may use non-main threads.
+ setmcpumax(runtime_gomaxprocs);
runtime_sched.init = true;
scvg = __go_go(runtime_MHeap_Scavenger, nil);
main_init();
@@ -416,7 +416,6 @@
/*
* runtime c-called (but written in Go)
*/
-void runtime_newError(String, Eface*);
void runtime_printany(Eface)
__asm__("libgo_runtime.runtime.Printany");
void runtime_newTypeAssertionError(const String*, const String*, const String*, const String*, Eface*)
@@ -429,7 +428,6 @@
*/
void runtime_semacquire(uint32 volatile *);
void runtime_semrelease(uint32 volatile *);
-String runtime_signame(int32 sig);
int32 runtime_gomaxprocsfunc(int32 n);
void runtime_procyield(uint32);
void runtime_osyield(void);