ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB CPP RS Driver API Documentation CustomAllocator

Caution

You're viewing documentation for an unstable version of ScyllaDB CPP RS Driver. Switch to the latest stable version.

CustomAllocator¶

typedef void *(*CassMallocFunction)(size_t size)¶

A custom malloc function. This function should allocate “size” bytes and return a pointer to that memory

See also

CassFreeFunction

See also

cass_alloc_set_functions()

Param size:

[in] The size of the memory to allocate

typedef void *(*CassReallocFunction)(void *ptr, size_t size)¶

A custom realloc function. This function attempts to change the size of the memory pointed to by “ptr”. If the memory cannot be resized then new memory should be allocated and contain the contents of the original memory at “ptr”.

See also

CassMallocFunction

See also

CassFreeFunction

See also

cass_alloc_set_functions()

Param ptr:

[in] A pointer to the original memory. If NULL it should behave the same as “CassMallocFunction”

Param size:

[in] The size of the memory to allocate/resize.

typedef void (*CassFreeFunction)(void *ptr)¶

A custom free function. This function deallocates the memory pointed to by “ptr” that was previously allocated by a “CassMallocFunction” or “CassReallocFunction” function.

See also

CassMallocFunction

See also

CassReallocFunction

See also

cass_alloc_set_functions()

Param ptr:

[in] A pointer to memory that should be deallocated. If NULL then this will perform no operation.

void cass_alloc_set_functions(CassMallocFunction malloc_func, CassReallocFunction realloc_func, CassFreeFunction free_func)¶

Set custom allocation functions.

Warning: This function is not yet implemented.

Note: This is not thread-safe. The allocation functions must be set before any other library function is called.

Default: The C runtime’s malloc(), realloc() and free()

Important: The C runtime’s malloc(), realloc() and free() will be used by libuv when using versions 1.5 or earlier.

Parameters:
  • malloc_func – [in]

  • realloc_func – [in]

  • free_func – [in]

Was this page helpful?

PREVIOUS
CassValueType
NEXT
Logging
  • Create an issue
  • Edit this page

On this page

  • CustomAllocator
    • CassMallocFunction
    • CassReallocFunction
    • CassFreeFunction
    • cass_alloc_set_functions()
ScyllaDB CPP RS Driver
  • master
    • master
    • v1.0.0
  • ScyllaDB CPP RS Driver
  • API Documentation
    • BasicTypes
    • CassConsistency
    • CassError
    • CassValueType
    • CustomAllocator
    • Logging
    • Miscellaneous
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVersion
  • Getting Started
  • Architecture Overview
  • Installation
  • Building
  • Testing
  • Using the Driver
    • Batches
    • Binding Parameters
    • Client-side timestamps
    • Consistency
    • Data Types
      • The date and time Types
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
    • Futures
    • Handling Results
    • Keyspaces
    • Prepared Statements
    • Schema Metadata
  • Configuration
    • Load balancing
    • Retry policies
    • Speculative Execution
    • Connection
    • Execution Profiles
    • Performance Tips
    • Client Configuration
  • Security
    • Authentication
    • TLS
  • Observability
    • Logging
    • Tracing
    • Metrics
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 17 Mar 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.1
Ask AI