PSP Hacks - Forums
Go Back   PSP Hacks - Forums > PSP Community > PSP Programming & Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2008, 10:12 PM
hockeyhead019 hockeyhead019 is offline
PSP Neophyte
 
Join Date: Aug 2007
Location: a land down unda
Posts: 51
hockeyhead019 User Has a Beginner Reputation
Default oslib mem usage question

hey guys,

just curious to the method that oslib uses...

ok so when you load an image into the mem when does oslib take it out? like would you ever run into a problem if you (hypothetically speaking) loaded too much... and if so is there a simple function which would take it out of the memory?

thanks guys
__________________
PSP is an amazing little device... now it's up to us to utilize it

You miss 100% of shots you never take - The Great One Wayne Gretzky
Reply With Quote
  #2  
Old 11-11-2008, 02:22 AM
Blade_punk's Avatar
Blade_punk Blade_punk is offline
Moderator
PSP Monk
 
Join Date: Nov 2006
Location: Candy Mountain
Posts: 2,686
Blade_punk will become famous soon enoughBlade_punk will become famous soon enough
Default

Hey,
OSLib doesn't do any sort of memory management in the way of unloading stuff. If you load more than the RAM can hold you'll freeze the PSP.
Code:
oslDeleteSound();
and
Code:
oslDeleteImage();
Removes images/sounds from memory. You have to do them in a certain order though. If you load your images like this:
Code:
oslLoadImage(a, blah blah);
oslLoadImage(b, blah blah);
oslLoadImage(c, blah blah);
you have to unload them the opposite way:
Code:
oslDeleteSound(c);
oslDeleteSound(b);
oslDeleteSound(a);
__________________
The PSP Programming and Development Mega Thread
-Rock Station-
PSN: Xsjado7
Quote:
Why don't you try walking on your hands! Then you could use your feet for hi-5's and eating sandwiches. You know, all the important stuff!
Reply With Quote
  #3  
Old 11-11-2008, 11:53 PM
hockeyhead019 hockeyhead019 is offline
PSP Neophyte
 
Join Date: Aug 2007
Location: a land down unda
Posts: 51
hockeyhead019 User Has a Beginner Reputation
Default

thanks blade punk

but just curious what would happen if you tried to take them out of memory in the wrong order? would it just remove something that you didn't want removed? in other words is there a consequence to doing this wrong?
__________________
PSP is an amazing little device... now it's up to us to utilize it

You miss 100% of shots you never take - The Great One Wayne Gretzky
Reply With Quote
  #4  
Old 11-12-2008, 01:46 AM
Blade_punk's Avatar
Blade_punk Blade_punk is offline
Moderator
PSP Monk
 
Join Date: Nov 2006
Location: Candy Mountain
Posts: 2,686
Blade_punk will become famous soon enoughBlade_punk will become famous soon enough
Default

Freezes I think. Can't remember why. I think its mentioned in the OSLib doc
__________________
The PSP Programming and Development Mega Thread
-Rock Station-
PSN: Xsjado7
Quote:
Why don't you try walking on your hands! Then you could use your feet for hi-5's and eating sandwiches. You know, all the important stuff!
Reply With Quote
  #5  
Old 11-12-2008, 01:51 AM
jo3_sum jo3_sum is offline
Programmer
PSP Hacks Member
 
Join Date: Jan 2008
Posts: 254
jo3_sum User Has a Beginner Reputation
Default

I think that only refers to when images, that were copied, are deleted before the copies.
__________________
?Console World !
Reply With Quote
  #6  
Old 11-12-2008, 07:26 PM
hockeyhead019 hockeyhead019 is offline
PSP Neophyte
 
Join Date: Aug 2007
Location: a land down unda
Posts: 51
hockeyhead019 User Has a Beginner Reputation
Default

k thanks guys
__________________
PSP is an amazing little device... now it's up to us to utilize it

You miss 100% of shots you never take - The Great One Wayne Gretzky
Reply With Quote
Reply

 



Thread Tools
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©