equal
deleted
inserted
replaced
359 size_t sz; |
359 size_t sz; |
360 MEMORY_BASIC_INFORMATION minfo; |
360 MEMORY_BASIC_INFORMATION minfo; |
361 VirtualQuery(&minfo, &minfo, sizeof(minfo)); |
361 VirtualQuery(&minfo, &minfo, sizeof(minfo)); |
362 sz = (size_t)os::current_stack_base() - (size_t)minfo.AllocationBase; |
362 sz = (size_t)os::current_stack_base() - (size_t)minfo.AllocationBase; |
363 return sz; |
363 return sz; |
|
364 } |
|
365 |
|
366 size_t os::committed_stack_size(address bottom, size_t size) { |
|
367 MEMORY_BASIC_INFORMATION minfo; |
|
368 address top = bottom + size; |
|
369 size_t committed_size = 0; |
|
370 |
|
371 while (committed_size < size) { |
|
372 // top is exclusive |
|
373 VirtualQuery(top - 1, &minfo, sizeof(minfo)); |
|
374 if ((minfo.State & MEM_COMMIT) != 0) { |
|
375 committed_size += minfo.RegionSize; |
|
376 top -= minfo.RegionSize; |
|
377 } else { |
|
378 break; |
|
379 } |
|
380 } |
|
381 |
|
382 return MIN2(committed_size, size); |
364 } |
383 } |
365 |
384 |
366 struct tm* os::localtime_pd(const time_t* clock, struct tm* res) { |
385 struct tm* os::localtime_pd(const time_t* clock, struct tm* res) { |
367 const struct tm* time_struct_ptr = localtime(clock); |
386 const struct tm* time_struct_ptr = localtime(clock); |
368 if (time_struct_ptr != NULL) { |
387 if (time_struct_ptr != NULL) { |