finalize config and allocate data memory
| 1317 | |
| 1318 | // finalize config and allocate data memory |
| 1319 | int cDataMemoryLevel::configureLevel() |
| 1320 | { |
| 1321 | /* |
| 1322 | if (lcfg.blocksizeIsSet) return 1; |
| 1323 | |
| 1324 | // TODO: what is the actual minimum buffersize, given blocksizeRead and blocksizeWrite?? |
| 1325 | long minBuf; // = blocksizeRead + 2*blocksizeWrite; |
| 1326 | if (lcfg.blocksizeReader <= lcfg.blocksizeWriter) { |
| 1327 | minBuf = 2*lcfg.blocksizeWriter + 1; // +1 just for safety... |
| 1328 | } else { |
| 1329 | minBuf = MAX( 2*lcfg.blocksizeWriter, (lcfg.blocksizeReader/lcfg.blocksizeWriter) * lcfg.blocksizeWriter ) + 1; // +1 just for safety... |
| 1330 | } |
| 1331 | |
| 1332 | // adjust level buffersize based on blocksize from write requests... |
| 1333 | if (lcfg.nT<minBuf) { |
| 1334 | lcfg.nT = minBuf; |
| 1335 | } |
| 1336 | |
| 1337 | lcfg.blocksizeIsSet = 1; |
| 1338 | */ |
| 1339 | return 1; |
| 1340 | } |
| 1341 | |
| 1342 | // Finalizes config and allocates data memory buffer |
| 1343 | int cDataMemoryLevel::finaliseLevel() |