FAQ
Hello all,

I would like to know if there is a limit of the number of elements an array
can handle. It look like it is not possible for me to add more than 999993
elements.

There is the code https://github.com/sahid/gostress/blob/master/pool.go

I have tried to start in the same host to proc of the program and the limit
is the same.
I have checked some log like kern, dmsg but nothing.

So maybe there is a limitation in the runtime?

s.


--
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/groups/opt_out.

Search Discussions

  • Volker Dobler at Oct 29, 2013 at 10:29 am
    Am Dienstag, 29. Oktober 2013 11:03:18 UTC+1 schrieb Sahid Orentino
    Ferdjaoui:
    I would like to know if there is a limit of the number of elements an
    array can handle. It look like it is not possible for me to add more than
    999993 elements.

    There is the code https://github.com/sahid/gostress/blob/master/pool.go

    The code posted does not contain any array, not even a slice.
    Is this a question about maps?

    V.

    --
    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/groups/opt_out.
  • Chris dollin at Oct 29, 2013 at 11:06 am

    On 29 October 2013 10:03, Sahid Orentino Ferdjaoui wrote:

    Hello all,

    I would like to know if there is a limit of the number of elements an
    array can handle. It look like it is not possible for me to add more than
    999993 elements.
    You can't add elements to an array -- the size of an array is parts of its
    type.
    Did you mean a slice? Or perhaps a map?

    There are no arrays in pool.go, but there is a map.

    How did your code fail? Can you produce a small, complete example?

    Chris

    --
    Chris "allusive" Dollin

    --
    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/groups/opt_out.
  • Péter Szilágyi at Oct 29, 2013 at 11:10 am
    Hi,

       There shouldn't be any limits on the number of elements a map can hold.
    This code [1] on the play server runs till 3M elements before hitting a
    memory limit, but locally I can ramp it up till 50M without issues (got
    bored waiting afterwards, no problems encountered).

       Could you please post the exact error message?

    Cheers,
       Peter

    [1] http://play.golang.org/p/Pb0DHoVToW

    On Tue, Oct 29, 2013 at 12:03 PM, Sahid Orentino Ferdjaoui wrote:

    Hello all,

    I would like to know if there is a limit of the number of elements an
    array can handle. It look like it is not possible for me to add more than
    999993 elements.

    There is the code https://github.com/sahid/gostress/blob/master/pool.go

    I have tried to start in the same host to proc of the program and the
    limit is the same.
    I have checked some log like kern, dmsg but nothing.

    So maybe there is a limitation in the runtime?

    s.


    --
    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/groups/opt_out.
    --
    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/groups/opt_out.
  • Sahid Orentino Ferdjaoui at Oct 29, 2013 at 11:18 am
    Hi Péter, this is no error, just I can't handle more connections. I
    understand that now, the problem didn't come from the map.





    s.

    On Tue, Oct 29, 2013 at 12:10 PM, Péter Szilágyi wrote:

    Hi,

    There shouldn't be any limits on the number of elements a map can hold.
    This code [1] on the play server runs till 3M elements before hitting a
    memory limit, but locally I can ramp it up till 50M without issues (got
    bored waiting afterwards, no problems encountered).

    Could you please post the exact error message?

    Cheers,
    Peter

    [1] http://play.golang.org/p/Pb0DHoVToW


    On Tue, Oct 29, 2013 at 12:03 PM, Sahid Orentino Ferdjaoui <
    sahid.ferdjaoui@gmail.com> wrote:
    Hello all,

    I would like to know if there is a limit of the number of elements an
    array can handle. It look like it is not possible for me to add more than
    999993 elements.

    There is the code https://github.com/sahid/gostress/blob/master/pool.go

    I have tried to start in the same host to proc of the program and the
    limit is the same.
    I have checked some log like kern, dmsg but nothing.

    So maybe there is a limitation in the runtime?

    s.


    --
    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/groups/opt_out.
    --
    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/groups/opt_out.
  • Sahid Orentino Ferdjaoui at Oct 29, 2013 at 11:22 am
    I'm using this map to keep a track of every established connections




    s.

    On Tue, Oct 29, 2013 at 12:18 PM, Sahid Orentino Ferdjaoui wrote:

    Hi Péter, this is no error, just I can't handle more connections. I
    understand that now, the problem didn't come from the map.





    s.

    On Tue, Oct 29, 2013 at 12:10 PM, Péter Szilágyi wrote:

    Hi,

    There shouldn't be any limits on the number of elements a map can hold.
    This code [1] on the play server runs till 3M elements before hitting a
    memory limit, but locally I can ramp it up till 50M without issues (got
    bored waiting afterwards, no problems encountered).

    Could you please post the exact error message?

    Cheers,
    Peter

    [1] http://play.golang.org/p/Pb0DHoVToW


    On Tue, Oct 29, 2013 at 12:03 PM, Sahid Orentino Ferdjaoui <
    sahid.ferdjaoui@gmail.com> wrote:
    Hello all,

    I would like to know if there is a limit of the number of elements an
    array can handle. It look like it is not possible for me to add more than
    999993 elements.

    There is the code https://github.com/sahid/gostress/blob/master/pool.go

    I have tried to start in the same host to proc of the program and the
    limit is the same.
    I have checked some log like kern, dmsg but nothing.

    So maybe there is a limitation in the runtime?

    s.


    --
    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/groups/opt_out.
    --
    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/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 29, '13 at 10:03a
activeOct 29, '13 at 11:22a
posts6
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase