diff options
author | Austin Clements <austin@google.com> | 2018-01-29 12:22:32 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2018-02-13 22:35:47 +0000 |
commit | 8693b4f095b2efdbd11967655579606bc3192c59 (patch) | |
tree | 52997e4467c4a39b3177c45601f1fbd0d4f50a06 /src/runtime/os_dragonfly.go | |
parent | 618f88d847af9a060a14794859d4f1ea51a08006 (diff) | |
download | go-8693b4f095b2efdbd11967655579606bc3192c59.tar.gz go-8693b4f095b2efdbd11967655579606bc3192c59.zip |
runtime: remove unused memlimit function
Change-Id: Id057dcc85d64e5c670710fbab6cacd4b906cf594
Reviewed-on: https://go-review.googlesource.com/93655
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/os_dragonfly.go')
-rw-r--r-- | src/runtime/os_dragonfly.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/runtime/os_dragonfly.go b/src/runtime/os_dragonfly.go index 4e506796de..4c3ce28074 100644 --- a/src/runtime/os_dragonfly.go +++ b/src/runtime/os_dragonfly.go @@ -193,37 +193,6 @@ func unminit() { unminitSignals() } -func memlimit() uintptr { - /* - TODO: Convert to Go when something actually uses the result. - - Rlimit rl; - extern byte runtime·text[], runtime·end[]; - uintptr used; - - if(runtime·getrlimit(RLIMIT_AS, &rl) != 0) - return 0; - if(rl.rlim_cur >= 0x7fffffff) - return 0; - - // Estimate our VM footprint excluding the heap. - // Not an exact science: use size of binary plus - // some room for thread stacks. - used = runtime·end - runtime·text + (64<<20); - if(used >= rl.rlim_cur) - return 0; - - // If there's not at least 16 MB left, we're probably - // not going to be able to do much. Treat as no limit. - rl.rlim_cur -= used; - if(rl.rlim_cur < (16<<20)) - return 0; - - return rl.rlim_cur - used; - */ - return 0 -} - func sigtramp() type sigactiont struct { |