Negative memory_get_usage() Values



Hey gang,

I'm getting a negative return value from memory_get_usage() using the following script. My I've got --enable-memory-limit enabled and my memory_limit is set to 100MB (which should more than enough memory).

I suspect that there is a bug in utf8_encode() but I'd like others to test it (on different platforms) before I submit it as a bug.

<?php

for ($i=0; $i < 20000; $i++) {
echo utf8_encode('This is a test');
}

echo memory_get_usage();

?>


Chris
chris@xxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: Grep and mv
    ... > I could recommend another book, ... echo shows my for / done ... script is getting good values ... So I get to write my first bug report for a serious ...
    (comp.unix.shell)
  • cvs-src summary for June 14-21
    ... Intel PRO/10GbE driver MFC'ed ... Max responded, saying that since the script only adds lines to the output, ... Max later backed out the commit. ... Bruce Evans fixed a bug that allowed users to crash the system by ...
    (freebsd-current)
  • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
    ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
    (Full-Disclosure)
  • Ripping Tapes with Linux--How To
    ... the full script is located in the BASH ... My tape player is a portable style journalist's recorder from the ... The most irritating part of the recording process was setting the ... echo Starting de-noise procedure to file $TMP1 ...
    (comp.os.linux.misc)
  • Re: Linux Backup with Modification Date Filter?
    ... I wrote a bash script that acts as a wrapper to rsnapshot which first ... generates a modification-date filter, ...
    (comp.os.linux.misc)