[Date Prev][Date Next]
Memory management for client API
- To: email@example.com
- Subject: Memory management for client API
- From: Erez Zilber <firstname.lastname@example.org>
- Date: Thu, 5 Apr 2018 15:33:37 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=yuK79E4KfJK2PZ/JEw91jQAeLebPLkx7thwlmzWoOxA=; b=AFbU246pGcAaERA7v7lWKBUIgIOEmQifEFdTi9UC1EUM17zsX9y46pBBfv+GTo+wZY rI2zhNls67n+VQMtqmaUuehyq0hweGE9SESPGQULYtRloYENw4IlS1ZNFwEUZeo20p2X 6y+LbRUrRCZlaTUoH86EHGVIhV3jXdWJyrvgjYPQOuJG6l0qU0qBlfMoMDFQ0py0cw9I i2m/IohAFj/cYYBgJnNh3hKThlTdJ1dwPqXp6c+AEroR02L/L7vqS97JxQzwTzzTy5dr aqYTcNODW+spl4gyn8V//LmItnKqcdooS8NgRnigE4dBhlMmUIHXswW2ehJFsjan6wDv fyxQ==
I'm trying to implement a LDAP client. I see that functions like
ldap_search_ext_s() may dynamically allocate memory.
Is there a way to supply my own memory allocation functions for
open-ldap API? I'm asking because I would like to allocate memory
during initialization, not during run time.
Else, how can I calculate the max amount of memory that such calls
will require? What should happen if not enough memory is available
when a function like ldap_search_ext_s() gets called? Is there a
special error code that indicates that?