-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Android
Description
What version of Go are you using (go version)?
GO 1.12 - 1.14
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
On android 9, on other all works
What did you do?
func main() {
bigArr := make([]byte, 250*1024*1024)
for i := 0; i < len(bigArr); i++ {
bigArr[i] = byte(i)
}
bigArr = nil
runtime.GC()
debug.FreeOSMemory()
for true {
//Some thing works in program
time.Sleep(time.Second)
}
}What did you expect to see?
I expected to see the memory in the system, but it remains in the program. If you allocate memory several times, then the program is killed by the system, but should clear it
In version 1.11.X all works in android 9, memory returning to os, but not execute on android 10. On android 5,6,7,8 all works of new golang version
Compile cmd: GOARM=7 GOOS=linux GOARCH=arm go build -o test main
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Android