[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: rename allocsa to malloca, freesa to freea

From: Bruno Haible
Subject: RFC: rename allocsa to malloca, freesa to freea
Date: Fri, 8 Jun 2007 03:20:40 +0200
User-agent: KMail/1.5.4

Hi Paul and others,

The gnulib macro 'allocsa' allocates memory on the stack or on the heap,
depending whether the requested memory size is smaller than a threshold
or not. 'freesa' frees such allocated memory.

The newest Microsoft runtime libraries contain functions with identical
semantics under the names '_malloca', '_freea':

There are the same now, and are not likely to change (given that the functions
take just one argument).

There is no reason for programmers to learn two different names for a
facility, and the Microsoft naming is not so bad: 'malloca' reminds both
'malloc' and 'alloca'. Since Microsoft will probably not align their function
names to gnulib naming (at least not in the immediately foreseeable future :-)),
I propose to rename the functions and their modules:

  allocsa -> malloca
  freesa -> freea
  xallocsa -> xmalloca

Of course we don't want the function name to start with an underscore; this
is a Microsoftism.


Have there been proposals to add functions/macros with these semantics


reply via email to

[Prev in Thread] Current Thread [Next in Thread]