Thread: dyn mem alloc

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    6

    dyn mem alloc

    In the new C99 version of C, it is then possible to create arrays with variable length. Does that mean that dynamic memory allocation is pretty much obsolete? What else does dynamic allocation offer?

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    dynamic memory offers control over the lifespan of an array or value. Also, structs containing arrays still cannot be variable length.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Structs and mem allocation
    By reversaflex in forum C Programming
    Replies: 2
    Last Post: 07-03-2008, 07:46 AM
  2. Mem alloc
    By dazellerington in forum C Programming
    Replies: 2
    Last Post: 05-06-2007, 02:55 PM
  3. Replies: 6
    Last Post: 06-02-2006, 08:32 AM
  4. Problems with unsigned char and mem management.
    By Hulag in forum C++ Programming
    Replies: 8
    Last Post: 10-13-2005, 07:03 AM
  5. dynamic mem alloc of 2-d arrays
    By hankspears in forum C Programming
    Replies: 6
    Last Post: 04-09-2002, 02:30 PM