From: SeokYeon Hwang Date: Wed, 12 Aug 2015 05:33:14 +0000 (+0900) Subject: emul_state: provide RAM size using ram_size global variable X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~40^2~205 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b3672da2df91fcf6771b4823dcc6610d20c45f7;p=sdk%2Femulator%2Fqemu.git emul_state: provide RAM size using ram_size global variable Change-Id: I41b775176d1fc8d0f75d9490dc48c9ba23c7ecfc Signed-off-by: SeokYeon Hwang --- diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 310dea6061..d37cc05cec 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -435,17 +435,6 @@ bool get_emul_cpu_accel(void) return false; } -/* VM ram size */ -void set_emul_ram_size(const char *size) -{ - _emul_info.vm_ram_size = size; -} - -const char* get_emul_ram_size(void) -{ - return _emul_info.vm_ram_size; -} - /* file sharing path */ void set_emul_file_sharing_path(const char *path) { @@ -615,6 +604,12 @@ bool is_gpu_accel_enabled(void) return gpu_accel_enabled; } +// ram size +uint64_t get_ram_size(void) +{ + return ram_size; +} + // vm_data_path static const char *vm_data_path = NULL; diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h index 2661018947..265a7dc7e7 100644 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -89,7 +89,6 @@ enum { }; typedef struct EmulatorConfigInfo { - bool skin_enable; int sdl_bpp; bool input_mouse_enable; bool input_touch_enable; @@ -103,7 +102,6 @@ typedef struct EmulatorConfigInfo { int spice_port; const char *skin_path; const char *file_sharing_path; - const char *vm_ram_size; int serial_port; /* add here */ } EmulatorConfigInfo; @@ -140,7 +138,6 @@ void set_emul_ecs_port(int port); void set_emul_guest_ip(char *ip); void set_emul_host_ip(char *ip); void set_emul_file_sharing_path(const char *path); -void set_emul_ram_size(const char *size); void set_emulator_condition(int state); void set_emul_rotation(short rotation_type); @@ -163,7 +160,6 @@ int get_emul_spice_port(void); const char* get_emul_skin_path(void); bool get_emul_cpu_accel(void); const char* get_emul_file_sharing_path(void); -const char* get_emul_ram_size(void); int get_emulator_condition(void); short get_emul_rotation(void); @@ -193,6 +189,7 @@ const char *get_vm_name(void); const char *get_profile_name(void); bool is_gpu_accel_enabled(void); const char *get_vm_data_path(void); +uint64_t get_ram_size(void); void set_initial_display_resolution(int width, int height); int get_display_resolution_width(void); int get_display_resolution_height(void); diff --git a/tizen/src/ui/menu/detailedinfodialog.cpp b/tizen/src/ui/menu/detailedinfodialog.cpp index 86b0161559..4bd539c73b 100644 --- a/tizen/src/ui/menu/detailedinfodialog.cpp +++ b/tizen/src/ui/menu/detailedinfodialog.cpp @@ -98,8 +98,7 @@ DetailedInfoDialog::DetailedInfoDialog(QWidget *parent) : setDataTable(vmInfoTable, DETAILED_INFO_CPU, "x86", index++); setDataTable(vmInfoTable, DETAILED_INFO_RAM_SIZE, - QString(get_emul_ram_size()) + " MB", index++); - + QString::number(get_ram_size() >> 20) + " MiB", index++); setDataTable(vmInfoTable, DETAILED_INFO_DPY_RESOLUTION, QString::number(win->uiInfo->resolution.width()) + "x" + QString::number(win->uiInfo->resolution.height()), index++); diff --git a/vl.c b/vl.c index a1d9dcdf17..50726f9f7e 100644 --- a/vl.c +++ b/vl.c @@ -3304,10 +3304,6 @@ int main(int argc, char **argv, char **envp) "'%s' option", slots_str ? "maxmem" : "slots"); exit(EXIT_FAILURE); } - -#ifdef CONFIG_MARU - set_emul_ram_size(optarg); -#endif break; } #ifdef CONFIG_TPM