Code Monkey home page Code Monkey logo

pecl-system-dio's People

Contributors

cmb69 avatar edinkad avatar fmk avatar helly25 avatar johannes avatar maners avatar meow-watermelon avatar mfn avatar mhei avatar pierrejoye avatar remicollet avatar roojs avatar saundefined avatar sebastianbergmann avatar tyrael avatar weltling avatar wez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pecl-system-dio's Issues

Possible memory leak in dio_read()

Hi, I've been testing out various IO options for an application that needs a very high IO throughput.
When testing the DIO functions, I keep getting an error saying I've run out of memory after calling dio_read() multiple times.

Test code
`<?php

#Create a 10KB file
file_put_contents(DIR.'/dio-test-file', str_repeat('0', 10 * 1024));

$hFile = dio_open(DIR.'/dio-test-file', O_RDONLY);
while(true){

#Go back to the start of the file
dio_seek($hFile, 0);

#Read some data
$data = dio_read($hFile, 10000);

}

?>`

I would expect the test code above to sit in the loop reading the first 10,000 bytes from the file over and over until the script is killed.
Instead, the script exits almost immediately with the following error
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) in /dio-test.php on line 13

PHP 8 incompatibility

While there are source code directories for php5 and php7, there is none for php8, so the package cannot be build for recent PHP versions. If there are no plans to support this, it might be a good idea to add the info to package.xml, so users get clearer information why they won't be able to build.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.