Sponsored Content
Top Forums Shell Programming and Scripting Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes) Post 302479975 by elamurugu on Monday 13th of December 2010 02:23:38 PM
Old 12-13-2010
Question Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like

Quote:
PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 401 bytes) in - on line 207506
Few lines in data are not being processed.

After googling it I came to know that adding such line would give some memory to it
Code:
ini_set("memory_limit","64M");

my input file size is 1 GB.

Is that memory limit is based on RAM we have on the system ?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to get the size of process in Bytes

Hi All, We have the commands top and ps through which we can find out the size of the running process. These commnds are giving the size of my process in MB after rounding of the size. Is there any way by which I can get the size of my process in Bytes or KBytes. Any help would be greatly... (2 Replies)
Discussion started by: darshi
2 Replies

2. Shell Programming and Scripting

Remove first N bytes and last N bytes from a binary file on AIX.

Hi all, Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this? Your help is greatly appreciated!! Best Regards, Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies

3. Linux

Why does ext3 allocate 8 blocks for files that are few bytes long

The title is clear: why does ext3 allocate 8 blocks for files that are few bytes long? If I create a file named "test", put a few chars in it, and then I run: stat test I get that "Blocks: 8" I searched in the web and found that ext does that, it allocates 8 blocks even if It doesn't need... (4 Replies)
Discussion started by: Tavo
4 Replies

4. Shell Programming and Scripting

How to find size 0-4 bytes files?

Hi I need to find and delete 0-4 bytes size files in a folder. How can I achieve that? (1 Reply)
Discussion started by: kapilk
1 Replies

5. Web Development

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

Any clues on how to get rid of this PHP error? PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /website/www/includes/functions_manpages.php on line 58 PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71... (4 Replies)
Discussion started by: Neo
4 Replies

6. Programming

Copying 1024 bytes data in 3-bytes chunk

Hi, If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script. dd bs=1024 count=3 if=/src of=/dest But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Discussion started by: royalibrahim
3 Replies

7. UNIX for Dummies Questions & Answers

X bytes of 0, Y bytes of random data, Z bytes of 5, T bytes of 1. ??

Hello guys. I really hope someone will help me with this one.. So, I have to write this script who: - creates a file home/student/vmdisk of 10 mb - formats that file to ext3 - mounts that partition to /mnt/partition - creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies

8. UNIX for Dummies Questions & Answers

AWK error - string cannot be longer than X bytes

Hi Friends, Could you please tell me why i am getting the below eror while working with awk. I am confused :confused: what to do ? awk: 0602-591 String 1,9,20,6,6 cannot be longer than 399 bytes. The source line is 1. The error context is >>> <<< awk: 0602-591... (2 Replies)
Discussion started by: i150371485
2 Replies

9. Shell Programming and Scripting

Shell script - entered input(1-40 bytes) needs to be converted exactly 40 bytes

hello, suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly. example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly. enter your name: donald duck (this is of 11 bytes) expected is as below - display 11... (3 Replies)
Discussion started by: shravan.300
3 Replies
XtMalloc(3Xt)							     MIT X11R4							     XtMalloc(3Xt)

Name
       XtMalloc, XtCalloc, XtRealloc, XtFree, XtNew, XtNewString - memory management functions

Syntax
       char *XtMalloc(size);
	  Cardinal size;

       char *XtCalloc(num, size);
	  Cardinal num;
	  Cardinal size;

       char *XtRealloc(ptr, num);
	  char *ptr;
	  Cardinal num;

       void XtFree(ptr);
	  char *ptr;

       type *XtNew(type);
	  type;

       String XtNewString(string);
	  String string;

Arguments
       num	 Specifies the number of bytes or array elements.

       ptr	 Specifies a pointer to the old storage or to the block of storage that is to be freed.

       size	 Specifies the size of an array element (in bytes) or the number of bytes desired.

       string	 Specifies a previously declared string.

       type	 Specifies a previously declared data type.

Description
       The functions returns a pointer to a block of storage of at least the specified size bytes.  If there is insufficient memory to allocate
       the new block, calls

       The function allocates space for the specified number of array elements of the specified size and initializes the space to zero.  If there
       is insufficient memory to allocate the new block, calls

       The function changes the size of a block of storage (possibly moving it).  Then, it copies the old contents (or as much as will fit) into
       the new block and frees the old block.  If there is insufficient memory to allocate the new block, calls If ptr is NULL, allocates the new
       storage without copying the old contents; that is, it simply calls

       The function returns storage and allows it to be reused.  If ptr is NULL, returns immediately.

       returns a pointer to the allocated storage.  If there is insufficient memory to allocate the new block, calls is a convenience macro that
       calls with the following arguments specified:

       ((type *) XtMalloc((unsigned) sizeof(type))

       returns a pointer to the allocated storage.  If there is insufficient memory to allocate the new block, calls is a convenience macro that
       calls with the following arguments specified:

       (strcpy(XtMalloc((unsigned) strlen(str) + 1), str))

See Also
       X Window System Toolkit: The Complete Programmer's Guide and Specification, Paul J. Asente and Ralph Swick
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

																     XtMalloc(3Xt)
All times are GMT -4. The time now is 09:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy