Lines Matching refs:bytes

2232   int bytes;
2233 while ((bytes = ::read(fd, buf, sizeof(buf))) > 0) {
2234 st->print_raw(buf, bytes);
2831 static void warn_fail_commit_memory(char* addr, size_t bytes, bool exec,
2834 ", %d) failed; error='%s' (errno=%d)", addr, bytes, exec,
2838 static void warn_fail_commit_memory(char* addr, size_t bytes,
2842 ", " SIZE_FORMAT ", %d) failed; error='%s' (errno=%d)", addr, bytes,
2846 int os::Solaris::commit_memory_impl(char* addr, size_t bytes, bool exec) {
2848 size_t size = bytes;
2852 numa_make_global(addr, bytes);
2860 warn_fail_commit_memory(addr, bytes, exec, err);
2861 vm_exit_out_of_memory(bytes, "committing reserved memory.");
2867 bool os::pd_commit_memory(char* addr, size_t bytes, bool exec) {
2868 return Solaris::commit_memory_impl(addr, bytes, exec) == 0;
2871 void os::pd_commit_memory_or_exit(char* addr, size_t bytes, bool exec,
2874 int err = os::Solaris::commit_memory_impl(addr, bytes, exec);
2877 warn_fail_commit_memory(addr, bytes, exec, err);
2878 vm_exit_out_of_memory(bytes, mesg);
2882 int os::Solaris::commit_memory_impl(char* addr, size_t bytes,
2884 int err = Solaris::commit_memory_impl(addr, bytes, exec);
2905 (void)Solaris::set_mpss_range(addr, bytes, page_size);
2911 bool os::pd_commit_memory(char* addr, size_t bytes, size_t alignment_hint,
2913 return Solaris::commit_memory_impl(addr, bytes, alignment_hint, exec) == 0;
2916 void os::pd_commit_memory_or_exit(char* addr, size_t bytes,
2920 int err = os::Solaris::commit_memory_impl(addr, bytes, alignment_hint, exec);
2923 warn_fail_commit_memory(addr, bytes, alignment_hint, exec, err);
2924 vm_exit_out_of_memory(bytes, mesg);
2929 void os::pd_free_memory(char* addr, size_t bytes, size_t alignment_hint) {
2930 if (madvise(addr, bytes, MADV_FREE) < 0) {
2945 void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
2947 assert((intptr_t)(addr + bytes) % alignment_hint == 0, "End should be aligned.");
2949 Solaris::set_mpss_range(addr, bytes, alignment_hint);
2954 void os::numa_make_local(char *addr, size_t bytes, int lgrp_hint) {
2956 if (madvise(addr, bytes, MADV_ACCESS_LWP) < 0) {
2962 void os::numa_make_global(char *addr, size_t bytes) {
2964 if (madvise(addr, bytes, MADV_ACCESS_MANY) < 0) {
3132 bool os::pd_uncommit_memory(char* addr, size_t bytes) {
3133 size_t size = bytes;
3152 char* os::Solaris::anon_mmap(char* requested_addr, size_t bytes, size_t alignment_hint, bool fixed) {
3168 return mmap_chunk(addr, bytes, flags, PROT_NONE);
3171 char* os::pd_reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) {
3172 char* addr = Solaris::anon_mmap(requested_addr, bytes, alignment_hint, (requested_addr != NULL));
3182 char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
3199 assert(bytes % os::vm_page_size() == 0, "reserving unexpected size block");
3203 char* addr = Solaris::anon_mmap(requested_addr, bytes, 0, false);
3209 pd_unmap_memory(addr, bytes);
3218 warning("attempt_reserve_memory_at: couldn't reserve " SIZE_FORMAT " bytes at "
3220 "%s", bytes, requested_addr, addr, buf);
3231 base[i] = reserve_memory(bytes);
3236 size[i] = bytes;
3242 size_t actual_gap = base[i-1] - base[i] - bytes;
3251 unmap_memory(base[i], bytes);
3261 // There is still a bug in this code: if top_overlap == bytes,
3273 size_t top_overlap = requested_addr + (bytes + gap) - base[i];
3274 if (top_overlap >= 0 && top_overlap < bytes) {
3278 size[i] = bytes - top_overlap;
3280 size_t bottom_overlap = base[i] + bytes - requested_addr;
3281 if (bottom_overlap >= 0 && bottom_overlap < bytes) {
3286 size[i] = bytes - bottom_overlap;
3288 size[i] = bytes;
3305 bool os::pd_release_memory(char* addr, size_t bytes) {
3306 size_t size = bytes;
3310 static bool solaris_mprotect(char* addr, size_t bytes, int prot) {
3313 int retVal = mprotect(addr, bytes, prot);
3321 bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
3333 return solaris_mprotect(addr, bytes, p);
3339 bool os::guard_memory(char* addr, size_t bytes) {
3340 return solaris_mprotect(addr, bytes, PROT_NONE);
3343 bool os::unguard_memory(char* addr, size_t bytes) {
3344 return solaris_mprotect(addr, bytes, PROT_READ|PROT_WRITE);
3493 bool os::Solaris::set_mpss_range(caddr_t start, size_t bytes, size_t align) {
3495 // from addr, addr + bytes
3500 if (memcntl(start, bytes, MC_HAT_ADVISE,
3564 bool os::release_memory_special(char* base, size_t bytes) {
3569 tkr.record((address)base, bytes);
5749 int os::available(int fd, jlong *bytes) {
5766 *bytes = n;
5778 *bytes = end - cur;
5784 char *addr, size_t bytes, bool read_only,
5805 char* mapped_address = (char*)mmap(addr, (size_t)bytes, prot, flags,
5816 char *addr, size_t bytes, bool read_only,
5819 return os::map_memory(fd, file_name, file_offset, addr, bytes, read_only,
5825 bool os::pd_unmap_memory(char* addr, size_t bytes) {
5826 return munmap(addr, bytes) == 0;
6133 // decode some bytes around the PC