Professional Web Applications Themes

Memory allocation error - esql/c - Informix

I have a problem during memory allocation in esql/c routine on following components: OS: SiniX 5.44 B1007 4/2560 IDS: 7.31.UD2X5 ESQL/C 7.24.UC6 with the command "malloc()" from esql/c we can only allocate approx. 12 MB this error does not occur with a plain c-programm. ( in a test we allocated more than 200 MB ). There are no error entries in the online.log file or /var/log/messages. Does anybody knows that problem ? TIA Ruediger...

  1. #1

    Default Memory allocation error - esql/c

    I have a problem during memory allocation in esql/c routine on following components:

    OS: SiniX 5.44 B1007 4/2560
    IDS: 7.31.UD2X5
    ESQL/C 7.24.UC6

    with the command "malloc()" from esql/c we can only allocate approx. 12 MB
    this error does not occur with a plain c-programm.
    ( in a test we allocated more than 200 MB ).

    There are no error entries in the online.log file or /var/log/messages.

    Does anybody knows that problem ?

    TIA
    Ruediger
    R?diger Guest

  2. #2

    Default Re: Memory allocation error - esql/c

    R?diger Papke wrote:
     

    You're using shared memory connections and INFORMIXSHMBASE is not set,
    or is set too low. Consequently, your memory allocations run into the
    shared memory segment, and fail - out of memory.

    Fixes: don't used shared memory database connections; don't use
    INFORMIXSHMBASE; use INFORMIXSHMBASE of zero; use a bigger value for
    INFORMIXSHMBASE. At least one of these should work.

    --
    Jonathan Leffler #include <disclaimer.h>
    Email: net, ibm.com
    Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

    Jonathan Guest

  3. #3

    Default Re: Memory allocation error - esql/c

    Jonathan Leffler <net> wrote in message news:<eJTyb.24585$news.pas.earthlink.net>... 
    >
    > You're using shared memory connections and INFORMIXSHMBASE is not set,
    > or is set too low. Consequently, your memory allocations run into the
    > shared memory segment, and fail - out of memory.
    >
    > Fixes: don't used shared memory database connections; don't use
    > INFORMIXSHMBASE; use INFORMIXSHMBASE of zero; use a bigger value for
    > INFORMIXSHMBASE. At least one of these should work.[/ref]

    Before publishing this problem I had the same idea.
    Primary this program used SHM-connection(default SHMBASE=0x2000000).
    But I tried TCP-connection and the same problem still remains.

    The server is configured for TCP- and SHM-connection (default SHMBASE=0x2000000).
    I think if only the (via-tcp-connecting) client has this problem,
    the SHMBASE-address of the server does not matter.

    Any other ideas, recommendations ?

    TIA
    Ruediger
    R?diger Guest

  4. #4

    Default Re: Memory allocation error - esql/c

    R?diger Papke wrote:
     
    >>
    >>You're using shared memory connections and INFORMIXSHMBASE is not set,
    >>or is set too low. Consequently, your memory allocations run into the
    >>shared memory segment, and fail - out of memory.
    >>
    >>Fixes: don't used shared memory database connections; don't use
    >>INFORMIXSHMBASE; use INFORMIXSHMBASE of zero; use a bigger value for
    >>INFORMIXSHMBASE. At least one of these should work.[/ref]
    >
    > Before publishing this problem I had the same idea.[/ref]

    Worth mentioning then - it might have saved a 24-hour cycle...
     

    There are only 6 zeroes there, so that's 24 zero bits, or a 32 MB
    offset to the start of shard memory. Try adding a seventh zero?
     

    Odd; the problem is in ESQL/C? Using TCP should remove the problem -
    unless there's a default connection still being made. What's your
    INFORMIXSERVER set to? Is it still a shared memory connection and you
    chose dbasetcp_server to test the TCP connection? You may find that
    ESQL/C is still connecting to the shared memory server, as well as the
    TCP/IP server.
     

    Still only 6 zeroes, not 7.
     

    I agree that this is odd. Do you have 'truss' or its equivalent
    available to you? Have you used it? Does it show any shared memory
    being allocated (probably shmat()).
     

    No other ideas from me - at least, not unprodded.

    --
    Jonathan Leffler #include <disclaimer.h>
    Email: net, ibm.com
    Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

    Jonathan Guest

  5. #5

    Default Re: Memory allocation error - esql/c

    Jonathan Leffler <net> wrote in message news:<eJTyb.24585$news.pas.earthlink.net>... 
    >
    > You're using shared memory connections and INFORMIXSHMBASE is not set,
    > or is set too low. Consequently, your memory allocations run into the
    > shared memory segment, and fail - out of memory.
    >
    > Fixes: don't used shared memory database connections; don't use
    > INFORMIXSHMBASE; use INFORMIXSHMBASE of zero; use a bigger value for
    > INFORMIXSHMBASE. At least one of these should work.[/ref]

    Before publishing this problem I had the same idea.
    Primary this program used SHM-connection(default SHMBASE=0x2000000).
    But I tried TCP-connection and the same problem still remains.

    The server is configured for TCP- and SHM-connection (default SHMBASE=0x2000000).
    I think if only the (via-tcp-connecting) client has this problem,
    the SHMBASE-address of the server does not matter.

    Any other ideas, recommendations ?

    TIA
    Ruediger
    R?diger Guest

Similar Threads

  1. #40701 [NEW]: Memory allocation error
    By michaeldaly at magma dot ca in forum PHP Bugs
    Replies: 25
    Last Post: April 25th, 07:56 PM
  2. How do i adjust memory allocation on mac osx for Freehand MX ??
    By James Noon in forum Macromedia Freehand
    Replies: 2
    Last Post: December 18th, 09:14 PM
  3. memory allocation problems in PHP and how to optimize?
    By lawrence in forum PHP Development
    Replies: 2
    Last Post: October 16th, 04:24 AM
  4. Big memory leak with ESQL/C library!
    By steven in forum Informix
    Replies: 2
    Last Post: September 19th, 05:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139