summaryrefslogtreecommitdiff
path: root/include/user/appmgr.h
diff options
context:
space:
mode:
authorRinnegatamante2020-06-19 14:52:26 +0200
committerFrancisco José García García2020-06-19 16:55:36 +0200
commited4325f95a2b8a833837ab8c0b740844d4bb37de (patch)
tree092fb95507522b0422bc188336fb7871a5f31890 /include/user/appmgr.h
parentUpdate modulemgr (#434) (diff)
downloadvds-libraries-ed4325f95a2b8a833837ab8c0b740844d4bb37de.tar.gz
Added sceAppMgrGetBudgetInfo prototype.
Diffstat (limited to '')
-rw-r--r--include/user/appmgr.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/include/user/appmgr.h b/include/user/appmgr.h
index ae0f6c9..16fd815 100644
--- a/include/user/appmgr.h
+++ b/include/user/appmgr.h
@@ -40,6 +40,12 @@ typedef enum SceAppMgrInfoBarTransparency {
SCE_APPMGR_INFOBAR_TRANSPARENCY_TRANSLUCENT = 1
} SceAppMgrInfoBarTransparency;
+typedef enum SceAppMgrApplicationMode {
+ SCE_APPMGR_APPLICATION_MODE_A = 2, //!< Application without physically contiguous memory access
+ SCE_APPMGR_APPLICATION_MODE_B = 3, //!< Application with physically contiguous memory access
+ SCE_APPMGR_APPLICATION_MODE_C = 4 //!< Application with physically contiguous memory and extra memory access
+} SceAppMgrApplicationMode;
+
typedef struct SceAppMgrSystemEvent {
int systemEvent; //!< One of ::SceAppMgrSystemEventType
uint8_t reserved[60]; //!< Reserved data
@@ -87,6 +93,25 @@ typedef struct SceAppMgrAppState {
SceUInt8 reserved[116];
} SceAppMgrAppState;
+typedef struct SceAppMgrBudgetInfo {
+ int size; //!< Must be 0x88
+ int app_mode; //!< One of ::SceAppMgrApplicationMode
+ int unk0; //!< Unknown Data
+ unsigned int total_user_rw_mem; //!< Total amount of accessible USER_RW memory
+ unsigned int free_user_rw; //!< Free amount of accessible USER_RW memory
+ SceBool extra_mem_allowed; //!< Flag for extra memory accessibility
+ int unk1; //!< Unknown Data
+ unsigned int total_extra_mem; //!< Total amount of accessible extra memory
+ unsigned int free_extra_mem; //!< Free amount of accessible extra memory
+ int unk2[2]; //!< Unknown Data
+ unsigned int total_phycont_mem; //!< Total amount of accessible physically contiguous memory
+ unsigned int free_phycont_mem; //!< Free amount of accessible physically contiguous memory
+ int unk3[10]; //!< Unknown Data
+ unsigned int total_cdram_mem; //!< Total amount of accessible CDRAM memory
+ unsigned int free_cdram_mem; //!< Free amount of accessible CDRAM memory
+ int reserved[9]; //!< Reserved data
+} SceAppMgrBudgetInfo;
+
typedef struct SceAppMgrExecOptParam SceAppMgrExecOptParam; // Missing struct
typedef struct SceAppMgrLaunchAppOptParam SceAppMgrLaunchAppOptParam; // Missing struct
@@ -487,7 +512,18 @@ int _sceAppMgrGetRawPath(char *path, char *resolved_path, int resolved_path_size
* @return 0 on success.
*/
int _sceAppMgrGetRawPathOfApp0ByAppIdForShell(int appId, char resolved_path[292]);
-
+
+/**
+ * Get memory budget info for a running system application
+ *
+ * @param[out] info - Info related to the memory budget of the running application.
+ *
+ * @return 0 on success, < 0 on error.
+ *
+ * @note This function will always return an error if used in a normal application.
+ */
+int sceAppMgrGetBudgetInfo(SceAppMgrBudgetInfo *info);
+
#ifdef __cplusplus
}
#endif