diff options
author | Daniel Plasa <dplasa@gmail.com> | 2020-05-26 04:56:07 +0200 |
---|---|---|
committer | Daniel Plasa <dplasa@gmail.com> | 2020-05-26 04:56:07 +0200 |
commit | 863ff54097231ceae6e34908d843586adc83a44d (patch) | |
tree | 28d5d8cefb34c55c1b56f3e573052bcc02ea04ce /espFtpServer.cpp | |
parent | try subtile malloc()'ing buffers with 16 byte steps until we get something (diff) | |
download | FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.tar FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.tar.gz FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.tar.bz2 FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.tar.lz FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.tar.xz FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.tar.zst FTPCLientServer-863ff54097231ceae6e34908d843586adc83a44d.zip |
Diffstat (limited to '')
-rw-r--r-- | espFtpServer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/espFtpServer.cpp b/espFtpServer.cpp index a6c705f..aa67fe3 100644 --- a/espFtpServer.cpp +++ b/espFtpServer.cpp @@ -1030,9 +1030,9 @@ int32_t FtpServer::allocateBuffer(int32_t desiredBytes) if (maxBlock - desiredBytes < 0) desiredBytes = maxBlock; - // leave at least (10% of heap) as reserve - if (maxHeap - desiredBytes < (maxHeap / 10)) - desiredBytes -= (maxHeap / 10); + // leave at least (20% of heap) as reserve + if (maxHeap - desiredBytes < (maxHeap / 5)) + desiredBytes -= (maxHeap / 5); // round down on 4byte bound desiredBytes &= ~3; |