Loading ...
Sorry, an error occurred while loading the content.
 

Re: [hackers-il] Malloc Checking [was Re: Re: Another Interesting Case Study: Permutations of a range of characters ]

Expand Messages
  • guy keren
    ... whats cha talkin about, willis? from alloca s man page: RETURN VALUES The alloca function returns a pointer to the beginning of the allocated space. If
    Message 1 of 47 , Jan 16, 2002
      On Wed, 16 Jan 2002, Adi Stav wrote:

      > Also, you can try to limit the number of malloc()s in your code. It's
      > not alwaysfeasible, but I find that on-stack buffers, inline
      > structs, and alloca() (which cannot fail) are often useful.

      whats'cha talkin' about, willis? from alloca's man page:

      RETURN VALUES
      The alloca function returns a pointer to the beginning of
      the allocated space. If the allocation failed, a NULL
      pointer is returned.

      ofcoruse it can fail - what if allocating space on stack requires mapping
      an unmapped page, and thre's no more memory overall on the system for
      that?

      --
      guy

      "For world domination - press 1,
      or dial 0, and please hold, for the creator." -- nob o. dy
    • Oleg Goldshmidt
      Shlomi and others who offered solutions for listing character string permutations in different languages, and those who amused themselves following that
      Message 47 of 47 , Jan 27, 2002
        Shlomi and others who offered solutions for listing
        character string permutations in different languages, and those who
        amused themselves following that thread, might find

        http://www.bagley.org/~doug/shootout/

        interesting. I just found it catching up on comp.lang.lisp. My
        understanding is that the site is no longer actively maintained.

        Check out the useful links list at the bottom. Perl lovers will
        find

        http://pleac.sourceforge.net/

        amusing, I guess.

        --
        Oleg Goldshmidt | ogoldshmidt@...
        If it aint't broken it hasn't got enough features yet.
      Your message has been successfully submitted and would be delivered to recipients shortly.