FAQ
Is there an equivalent to reading from /dev/zero, and/or mmapping huge
chunks of virtual memory with no backing device, and no write access to use
as sources of zeroed data in the Go standard library? Anywhere else?

Currently I have several packages that have little snippets of default
initialized arrays/byte slices that they use for the personal requirements,
but that seems potentially wasteful when they'll all in Go result in
read/writeable page allocations somewhere at run time.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Konstantin Kulikov at Mar 13, 2015 at 12:50 pm
    Hello.

    If I correctly understood your question this shoud do:
    http://play.golang.org/p/ynqSF9qJPZ
    On Fri, Mar 13, 2015 at 12:37 PM, Matt Joiner wrote:
    Is there an equivalent to reading from /dev/zero, and/or mmapping huge
    chunks of virtual memory with no backing device, and no write access to use
    as sources of zeroed data in the Go standard library? Anywhere else?

    Currently I have several packages that have little snippets of default
    initialized arrays/byte slices that they use for the personal requirements,
    but that seems potentially wasteful when they'll all in Go result in
    read/writeable page allocations somewhere at run time.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 13, '15 at 9:37a
activeMar 13, '15 at 12:50p
posts2
users2
websitegolang.org

2 users in discussion

Konstantin Kulikov: 1 post Matt Joiner: 1 post

People

Translate

site design / logo © 2022 Grokbase