763 // Like strdup, but exit VM when strdup() returns NULL
764 static char* strdup_check_oom(const char*, MEMFLAGS flags = mtInternal);
765
766 #ifndef PRODUCT
767 static julong num_mallocs; // # of calls to malloc/realloc
768 static julong alloc_bytes; // # of bytes allocated
769 static julong num_frees; // # of calls to free
770 static julong free_bytes; // # of bytes freed
771 #endif
772
773 // SocketInterface (ex HPI SocketInterface )
774 static int socket(int domain, int type, int protocol);
775 static int socket_close(int fd);
776 static int recv(int fd, char* buf, size_t nBytes, uint flags);
777 static int send(int fd, char* buf, size_t nBytes, uint flags);
778 static int raw_send(int fd, char* buf, size_t nBytes, uint flags);
779 static int connect(int fd, struct sockaddr* him, socklen_t len);
780 static struct hostent* get_host_by_name(char* name);
781
782 // Support for signals (see JVM_RaiseSignal, JVM_RegisterSignal)
783 static void signal_init(TRAPS);
784 static void signal_init_pd();
785 static void signal_notify(int signal_number);
786 static void* signal(int signal_number, void* handler);
787 static void signal_raise(int signal_number);
788 static int signal_wait();
789 static void* user_handler();
790 static void terminate_signal_thread();
791 static int sigexitnum_pd();
792
793 // random number generation
794 static int random(); // return 32bit pseudorandom number
795 static void init_random(unsigned int initval); // initialize random sequence
796
797 // Structured OS Exception support
798 static void os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, Thread* thread);
799
800 // On Posix compatible OS it will simply check core dump limits while on Windows
801 // it will check if dump file can be created. Check or prepare a core dump to be
802 // taken at a later point in the same thread in os::abort(). Use the caller
803 // provided buffer as a scratch buffer. The status message which will be written
804 // into the error log either is file location or a short error message, depending
|
763 // Like strdup, but exit VM when strdup() returns NULL
764 static char* strdup_check_oom(const char*, MEMFLAGS flags = mtInternal);
765
766 #ifndef PRODUCT
767 static julong num_mallocs; // # of calls to malloc/realloc
768 static julong alloc_bytes; // # of bytes allocated
769 static julong num_frees; // # of calls to free
770 static julong free_bytes; // # of bytes freed
771 #endif
772
773 // SocketInterface (ex HPI SocketInterface )
774 static int socket(int domain, int type, int protocol);
775 static int socket_close(int fd);
776 static int recv(int fd, char* buf, size_t nBytes, uint flags);
777 static int send(int fd, char* buf, size_t nBytes, uint flags);
778 static int raw_send(int fd, char* buf, size_t nBytes, uint flags);
779 static int connect(int fd, struct sockaddr* him, socklen_t len);
780 static struct hostent* get_host_by_name(char* name);
781
782 // Support for signals (see JVM_RaiseSignal, JVM_RegisterSignal)
783 static void initialize_jdk_signal_support(TRAPS);
784 static void signal_notify(int signal_number);
785 static void* signal(int signal_number, void* handler);
786 static void signal_raise(int signal_number);
787 static int signal_wait();
788 static void* user_handler();
789 static void terminate_signal_thread();
790 static int sigexitnum_pd();
791
792 // random number generation
793 static int random(); // return 32bit pseudorandom number
794 static void init_random(unsigned int initval); // initialize random sequence
795
796 // Structured OS Exception support
797 static void os_exception_wrapper(java_call_t f, JavaValue* value, const methodHandle& method, JavaCallArguments* args, Thread* thread);
798
799 // On Posix compatible OS it will simply check core dump limits while on Windows
800 // it will check if dump file can be created. Check or prepare a core dump to be
801 // taken at a later point in the same thread in os::abort(). Use the caller
802 // provided buffer as a scratch buffer. The status message which will be written
803 // into the error log either is file location or a short error message, depending
|