Bug #13190: shm_put_var() problem with free space calculation

From: Date: Fri, 07 Sep 2001 10:43:10 +0000
Subject: Bug #13190: shm_put_var() problem with free space calculation
Groups: php.dev 
Request: Send a blank email to php-dev+get-65333@lists.php.net to get a copy of this message
From: phpbug@oderwat.de Operating system: Linux SuSE 6.3 - Apache PHP version: 4.0.6 PHP Bug Type: *Extensibility Functions Bug description: shm_put_var() problem with free space calculation It seems that "shm_put_var()" has a problem with the calculation of free space for setting a variable the second time. I guess it calculates the remaining free space including the size taken by the old variable <?php $str=str_repeat("-",30); // 52 (max which fits in 100) is even worse $shm=shm_attach(0xfffe,100); shm_put_var($shm,1,$str); //shm_put_var($shm,1,0); // using that will make next statement work without error shm_put_var($shm,1,$str); // THIS will tell you there is not enoug memory left! shm_detach($shm); shm_remove(0xfffe); ?> Sincerely, Hans Raaf -- Edit bug report at: http://bugs.php.net/?id=13190&edit=1

« previous php.dev (#65333) next »