void *out_buf;
bool out_buf_malloced;
int ret;
- size_t stack_max = 32768;
ni = ntfs_pathname_to_inode(vol, NULL, loc->path);
if (!ni) {
out_buf_malloced = false;
if (cb) {
- if (in_chunk_size <= stack_max) {
+ if (in_chunk_size <= STACK_MAX) {
out_buf = alloca(in_chunk_size);
} else {
out_buf = MALLOC(in_chunk_size);
void *out_buf;
bool out_buf_malloced;
u64 bytes_remaining;
- const size_t stack_max = 32768;
HANDLE hFile = win32_open_existing_file(lte->file_on_disk,
FILE_READ_DATA);
out_buf_malloced = false;
if (cb) {
- if (in_chunk_size <= stack_max) {
+ if (in_chunk_size <= STACK_MAX) {
out_buf = alloca(in_chunk_size);
} else {
out_buf = MALLOC(in_chunk_size);
void *compressed_chunk = NULL;
unsigned compressed_size;
bool compressed_chunk_malloced = false;
- size_t stack_max = 32768;
if (ctx->doing_sha)
sha1_update(&ctx->sha_ctx, chunk, chunk_size);
if (ctx->out_ctype != WIMLIB_COMPRESSION_TYPE_NONE) {
/* Compress the chunk. */
- if (chunk_size <= stack_max) {
+ if (chunk_size <= STACK_MAX) {
compressed_chunk = alloca(chunk_size);
} else {
compressed_chunk = MALLOC(chunk_size);
input_idx_t num_matches;
input_idx_t compressed_len;
input_idx_t i;
- const size_t stack_max = 65536;
/* XPRESS requires 256 bytes of overhead for the Huffman code, so it's
* impossible to compress 256 bytes or less of data to less than the
if (uncompressed_len < XPRESS_NUM_SYMBOLS / 2 + 1 + 4)
return 0;
- if (uncompressed_len <= stack_max) {
+ if (uncompressed_len <= STACK_MAX) {
matches = alloca(uncompressed_len * sizeof(matches[0]));
udata = alloca(uncompressed_len + 8);
prev_tab = alloca(uncompressed_len * sizeof(prev_tab[0]));
#endif
out_free:
- if (uncompressed_len > stack_max) {
+ if (uncompressed_len > STACK_MAX) {
FREE(matches);
FREE(udata);
FREE(prev_tab);