[Date Prev][Date Next] [Chronological] [Thread] [Top]

IDL - use of alloca (ITS#1651)



Full_Name: Jong Hyuk Choi
Version: HEAD as of Mar 18
OS: Redhat 7.1 (2.4.2)
URL: ftp://ftp.openldap.org/incoming/diff.Mar18
Submission from: (NULL) (4.62.121.186)


Another possibility of IDL management 
is to use alloca() to allocate memory in stack.

If allcoa() is available, use alloca().
If alloca() returns NULL by an attempt to allocate large memory, then use
malloc().

In the following diff, a code is provided for idl.c routines :
bdb_idl_fetch_key, bdb_idl_insert_key, bdb_idl_delete_key.

This may also be used for "ID *stack" of search_candidates()
in the previous discussion.

- Jong