|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-24 09:27 UTC] johannes@php.net
[2010-02-24 09:55 UTC] miha dot space at gmail dot com
[2010-02-24 10:06 UTC] pajoye@php.net
[2010-03-02 03:02 UTC] felipe@php.net
-Package: Scripting Engine problem
+Package: SPL related
[2010-04-27 11:22 UTC] colder@php.net
-Status: Assigned
+Status: Feedback
[2010-04-27 11:22 UTC] colder@php.net
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Description: ------------ Is there any limit i also tried with memory_get_usage and with 29000 linkedlistnodes it uses about 9.25MB. In php.ini i have max 128MB, so this can't be the problem. Reproduce code: --------------- <?php class LinkedListNode { public $data; public $next; public function __construct($data) { $this->data = $data; $this->next = NULL; } } class LinkedList { private $first; private $last; public function __construct() { $this->first = NULL; $this->last = NULL; } public function insertLast($data) { $node = new LinkedListNode($data); if( $this->first != NULL ) { $this->last->next = &$node; $this->last = &$node; } else { $this->first = &$node; $this->last = &$node; } } } $list = new LinkedList(); /* it works for($i = 0; $i < 29488; $i++) { $list->insertLast(1); }*/ // Segmentation fault for($i = 0; $i < 29489; $i++) { $list->insertLast(1); } ?> Expected result: ---------------- Nothin, it should exit normally, not segfault. Actual result: -------------- php test2.php Segmentation fault