equal
deleted
inserted
replaced
181 } |
181 } |
182 |
182 |
183 julong os::physical_memory() { |
183 julong os::physical_memory() { |
184 return Linux::physical_memory(); |
184 return Linux::physical_memory(); |
185 } |
185 } |
186 |
|
187 //////////////////////////////////////////////////////////////////////////////// |
|
188 // environment support |
|
189 |
|
190 bool os::getenv(const char* name, char* buf, int len) { |
|
191 const char* val = ::getenv(name); |
|
192 if (val != NULL && strlen(val) < (size_t)len) { |
|
193 strcpy(buf, val); |
|
194 return true; |
|
195 } |
|
196 if (len > 0) buf[0] = 0; // return a null string |
|
197 return false; |
|
198 } |
|
199 |
|
200 |
186 |
201 // Return true if user is running as root. |
187 // Return true if user is running as root. |
202 |
188 |
203 bool os::have_special_privileges() { |
189 bool os::have_special_privileges() { |
204 static bool init = false; |
190 static bool init = false; |