QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

This returns a value when ran, what is it though?

This is a discussion on This returns a value when ran, what is it though? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I made it and ran it in lua player, but what is the value? its like around 60 - 150 ...

Reply
 
LinkBack Thread Tools
Old 08-18-2006, 12:58 PM   #1
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default This returns a value when ran, what is it though?

I made it and ran it in lua player, but what is the value? its like around 60 - 150 every time.

Code:
--MEM

red = Color.new(255,0,0)
infoMem = gcinfo()

while true do

screen:clear()
pad = Controls.read()

screen:print(100,100,"mem: "..infoMem,red)

if pad:start() then
return
end
screen.waitVblankStart()
screen:flip()
end
PS: where would this be useful?
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 01:10 PM   #2
 
Nutterbutter's Avatar
 
Join Date: Jun 2006
Location: London
Posts: 645
Trader Feedback: 0
Default

Is gcinfo() a function you have written? If so could you post the source to that?
__________________
[b][center]
[URL="http://forums.qj.net/showthread.php?t=65032"][SIZE="3"][COLOR="Blue"]Omicron[/COLOR] - [COLOR="DeepSkyBlue"]A hacking simulation game for the PSP[/COLOR][/SIZE][/URL]

[url=http://profile.mygamercard.net/dr+nutterbutter][img]http://card.mygamercard.net/gbar/live/dr+nutterbutter.gif[/img][/url][/b][/center]
Nutterbutter is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 01:26 PM   #3
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

Quote:
Originally Posted by Nutterbutter
Is gcinfo() a function you have written? If so could you post the source to that?
i found it online somewhere but i dunno what it does?
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 01:37 PM   #4
 
Urza's Avatar
 
Join Date: Aug 2005
Posts: 4,540
Trader Feedback: 0
Default

It returns the amount of dynamic RAM Lua is using in kbs.
Urza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 01:45 AM   #5
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

Quote:
Originally Posted by Urza the Tyrant
It returns the amount of dynamic RAM Lua is using in kbs.
o rite, how would it be useful?
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 02:05 AM   #6
 
HaxxBlaster's Avatar
 
Join Date: Nov 2005
Location: Sweden
Posts: 460
Trader Feedback: 0
Default

Maybe if it is about to overflow, so you can avoid it from freezing/restarting.
__________________
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]

[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
HaxxBlaster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 02:08 AM   #7
 
 
My Mood: Bored
Join Date: Apr 2006
Location: England ~¦¦¦|+|¦¦¦~
Posts: 1,112
Trader Feedback: 0
Default

Quote:
Originally Posted by HaxxBlaster
Maybe if it is about to overflow, so you can avoid it from freezing/restarting.
yer like:

Code:
if infoMem > 5000 then
System.Quit()
end
__________________
...Just Returned To The Scene...
JaSo PsP is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 02:34 AM   #8
 
Nutterbutter's Avatar
 
Join Date: Jun 2006
Location: London
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by JaSo PsP
o rite, how would it be useful?
If your app was using an above avarage amount of RAM, you could load lower res textures in or whatever.
__________________
[b][center]
[URL="http://forums.qj.net/showthread.php?t=65032"][SIZE="3"][COLOR="Blue"]Omicron[/COLOR] - [COLOR="DeepSkyBlue"]A hacking simulation game for the PSP[/COLOR][/SIZE][/URL]

[url=http://profile.mygamercard.net/dr+nutterbutter][img]http://card.mygamercard.net/gbar/live/dr+nutterbutter.gif[/img][/url][/b][/center]
Nutterbutter is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 05:07 AM   #9
 
Urza's Avatar
 
Join Date: Aug 2005
Posts: 4,540
Trader Feedback: 0
Default

More like:

Code:
if infoMem > 5000 then
screen:print(80,120,"The application has run out of memory and must restart",color)
screen.flip()
screen.waitVblankStart(200)
System.Quit()
end
I'm not sure about the number though.

Urza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 12:55 PM   #10

100% Pure Awesome
 
Join Date: Jan 2006
Posts: 508
Trader Feedback: 0
Default

Greater than 5000? Wouldn't you want less than 5000?
__________________

Ravine is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 12:57 PM   #11

Developer
 
uber0ne's Avatar
 
Join Date: Jun 2006
Location: Lakeland, FL, USA
Posts: 845
Trader Feedback: 0
Default

If it its greater then 5000 quit. No he wants greater.
-= Double Post =-
This also could be good for testing. Incase you want to add more things and are not sure about the RAM usage.
__________________


Last edited by uber0ne; 08-19-2006 at 12:57 PM.. Reason: Automerged Doublepost
uber0ne is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 01:00 PM   #12
 
Join Date: Oct 2005
Posts: 543
Trader Feedback: 0
Default

It returns the amount in use, not amount left...5000kb is really small, less than 5 mb...
__________________
HELP ME HAIRY LEG!!!!

I have a 1.5 (downgraded) US PSP
[code]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
( P | S | P | - | P | r | o | g | r | a | m | m | i | n | g )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
_ _ _ _ _
/ \ / \ / \ / \ / \
( A | d | m | i | n )
\_/ \_/ \_/ \_/ \_/ [/code]
nathan42100 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 01:59 PM   #13
 
Urza's Avatar
 
Join Date: Aug 2005
Posts: 4,540
Trader Feedback: 0
Default

Quote:
Originally Posted by nathan42100
5000kb is really small, less than 5 mb...
I never knew 5000kb was about 5mb :O [/sarcasm]

The post was just an example of the syntax you would use. Like I said, I don't know how much memory lua scripts have access to.

Urza is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 02:16 PM   #14

total-Z
 
youresam's Avatar
 
Join Date: Jul 2005
Location: texas
Posts: 2,803
Trader Feedback: 0
Default

From what I remember, its the ammount of memory allocated, and when you garbage collect, it becomes lower.
I remember it stands for garbage collect info
__________________
牧来栠摩琠敨映汩獥
PSN: youresam
From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
youresam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
ran , returns

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 10:27 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us