MALLOC: TYPE NAME EXPECTED

Discussion in 'C Programming' started by =?iso-8859-1?B?UG9pbmNhcuhf6F9hbmRhdG8=?=, Nov 21, 2006.

  1. Hi all,

    I built a softwaare (4 finite elements) and now that i solved all
    maths troubles i'm trying to expand some informatic skills.
    I call EXE file from cmd (under XP) and i made bad discoveries like
    that string for argvector must be not more than 127 chars long...
    I solved all except 1 thing:
    I'm using Borland TC with compact size for stack dimension (with bigger
    sizes EXES raise windows ferocity) and I mallocated dynamic vectors in
    usual way...
    but is that possible that i can't reach 7*400*sizeof(float)=11200 bytes
    I presume without getting memory overflow or application frozen?????
    And why i can't succed in writing
    int _stklen = desidered dimension;???
    Anyone had the same problem under XP?
    How to allocate big memory blocks? My program is at least 300 times
    faster than Matlab solvers....but as long as i can't work on big
    instances this computational power gets useless

    Thanks in advance
     
    =?iso-8859-1?B?UG9pbmNhcuhf6F9hbmRhdG8=?=, Nov 21, 2006
    #1
    1. Advertising

  2. =?iso-8859-1?B?UG9pbmNhcuhf6F9hbmRhdG8=?=

    Jack Klein Guest

    On 20 Nov 2006 19:25:37 -0800, "Poincarè_è_andato"
    <> wrote in comp.lang.c:

    > Hi all,
    >
    > I built a softwaare (4 finite elements) and now that i solved all
    > maths troubles i'm trying to expand some informatic skills.
    > I call EXE file from cmd (under XP) and i made bad discoveries like
    > that string for argvector must be not more than 127 chars long...
    > I solved all except 1 thing:
    > I'm using Borland TC with compact size for stack dimension (with bigger
    > sizes EXES raise windows ferocity) and I mallocated dynamic vectors in
    > usual way...
    > but is that possible that i can't reach 7*400*sizeof(float)=11200 bytes
    > I presume without getting memory overflow or application frozen?????
    > And why i can't succed in writing
    > int _stklen = desidered dimension;???
    > Anyone had the same problem under XP?
    > How to allocate big memory blocks? My program is at least 300 times
    > faster than Matlab solvers....but as long as i can't work on big
    > instances this computational power gets useless
    >
    > Thanks in advance


    Your problems are entirely compiler specific, and based mainly on the
    fact that you are using an antique 16-bit x86 compiler. That is the
    reason for the 127 character command line limit, the need to
    experiment with "memory models", and limited amounts of memory
    available. These are all limitations that are not imposed by the C
    language, or even your operating system, but by the use of a compiler
    more than 10 years obsolete.

    If for some reason you must use this compiler, you need to ask about
    such issues in Borland's support groups. For the compiler you are
    using, that would be news:borland.public.cpp.turbocpp, and you must
    post to it on Borland's server newsgroups.borland.com, because they
    don't accept posts from other servers.

    A much better solution is just to get a newer, better, 32-bit
    compiler. There are many free ones, including Visual Studio 2005 from
    Microsoft, a new native win-32 Turbo from Borland (see
    http://www.turboexplorer.com/), and various versions of gcc such as
    cygwin and mingw.

    So get a 21st century compiler and replace the antique.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Nov 21, 2006
    #2
    1. Advertising

  3. Tnanks a lot Jack




    Jack Klein wrote:
    > On 20 Nov 2006 19:25:37 -0800, "Poincarè_è_andato"
    > <> wrote in comp.lang.c:
    >
    > > Hi all,
    > >
    > > I built a softwaare (4 finite elements) and now that i solved all
    > > maths troubles i'm trying to expand some informatic skills.
    > > I call EXE file from cmd (under XP) and i made bad discoveries like
    > > that string for argvector must be not more than 127 chars long...
    > > I solved all except 1 thing:
    > > I'm using Borland TC with compact size for stack dimension (with bigger
    > > sizes EXES raise windows ferocity) and I mallocated dynamic vectors in
    > > usual way...
    > > but is that possible that i can't reach 7*400*sizeof(float)=11200 bytes
    > > I presume without getting memory overflow or application frozen?????
    > > And why i can't succed in writing
    > > int _stklen = desidered dimension;???
    > > Anyone had the same problem under XP?
    > > How to allocate big memory blocks? My program is at least 300 times
    > > faster than Matlab solvers....but as long as i can't work on big
    > > instances this computational power gets useless
    > >
    > > Thanks in advance

    >
    > Your problems are entirely compiler specific, and based mainly on the
    > fact that you are using an antique 16-bit x86 compiler. That is the
    > reason for the 127 character command line limit, the need to
    > experiment with "memory models", and limited amounts of memory
    > available. These are all limitations that are not imposed by the C
    > language, or even your operating system, but by the use of a compiler
    > more than 10 years obsolete.
    >
    > If for some reason you must use this compiler, you need to ask about
    > such issues in Borland's support groups. For the compiler you are
    > using, that would be news:borland.public.cpp.turbocpp, and you must
    > post to it on Borland's server newsgroups.borland.com, because they
    > don't accept posts from other servers.
    >
    > A much better solution is just to get a newer, better, 32-bit
    > compiler. There are many free ones, including Visual Studio 2005 from
    > Microsoft, a new native win-32 Turbo from Borland (see
    > http://www.turboexplorer.com/), and various versions of gcc such as
    > cygwin and mingw.
    >
    > So get a 21st century compiler and replace the antique.
    >
    > --
    > Jack Klein
    > Home: http://JK-Technology.Com
    > FAQs for
    > comp.lang.c http://c-faq.com/
    > comp.lang.c++ http://www.parashift.com/c -faq-lite/
    > alt.comp.lang.learn.c-c++
    > http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    =?iso-8859-1?B?UG9pbmNhcuhf6F9hbmRhdG8=?=, Nov 21, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Edwards

    Type name expected: Errors

    Andrew Edwards, Jul 27, 2003, in forum: C++
    Replies:
    1
    Views:
    838
    Andrew Edwards
    Jul 27, 2003
  2. Zenon
    Replies:
    6
    Views:
    4,920
    Rolf Magnus
    Nov 13, 2003
  3. Sergei Gnezdov

    type* name vs. type *name

    Sergei Gnezdov, Mar 29, 2005, in forum: C Programming
    Replies:
    5
    Views:
    302
    Gordon Burditt
    Mar 29, 2005
  4. Yevgen Muntyan

    #define ALLOCIT(Type) ((Type*) malloc (sizeof (Type)))

    Yevgen Muntyan, Feb 9, 2007, in forum: C Programming
    Replies:
    10
    Views:
    951
    Yevgen Muntyan
    Feb 13, 2007
  5. Replies:
    1
    Views:
    2,410
Loading...

Share This Page