Skip to content

Conversation

@lumpidu
Copy link

@lumpidu lumpidu commented Sep 9, 2021

The type size_t is used for most moderm implementations of malloc, calloc, realloc, etc.

Using just signed types like int leads to issues on 32-bit systems, if there are really large chunks of memory used such as e.g. for a chunk of 3.2 GB in Festival:

Building clunits/ldom index
WALLOC: failed to malloc -1094967296 bytes

Also, the macros walloc(), wcalloc() & wrealloc() use sizeof(), which itself returns size_t and not int.

Compiling speech-tools and Festival with these changes, at least compiles on my Mac just fine.

size_t is used for most moderm implementations of malloc, calloc, etc.
Using int leads to issues, if there are really large chunks of memory used
such as e.g. for 3.2 GB:

Building clunits/ldom index
WALLOC: failed to malloc -1094967296 bytes

Signed-off-by: Daniel Schnell <dschnell@grammatek.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant