summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/heap.h
Commit message (Collapse)AuthorAgeFilesLines
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-2/+0
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-211-1/+1
| | | | checkins. Regularize copyright format.
* * cygheap.cc (cygheap_fixup_in_child): Use user_heap element in cygheap.Christopher Faylor2002-10-221-2/+3
| | | | | | | | | | | | | | | | (init_cheap): Ditto for declaration. * fork.cc (fork_parent): Use user_heap element in cygheap. * heap.h (inheap): Ditto. * heap.cc (sbrk): Ditto. (heap_init): Ditto. Reorganize to shrink heap chunk as required and record new value in cygheap. * dcrt0.cc (dll_crt0_1): More "move the cygthread init" games. * shared.cc (open_shared): Rework memory protection to properly deal with relocated shared segment. (shared_info::heap_chunk_size): Rename element to 'heap_chunk'. * shared_info.h (shared_info): Ditto for declaration. * strace.cc (strace::hello): Report on heap chunk size from cygheap since it may shrink.
* * heap.h (inheap): Check for NULL.Christopher Faylor2001-10-051-1/+1
|
* Update copyrights.Christopher Faylor2001-09-111-1/+1
|
* * heap.h (inheap): Rewrite macro to accomodate removal of brk macros below.Christopher Faylor2001-09-091-1/+3
|
* * cygheap.cc (cygheap_fixup_in_child): Clear cygheap->base so that heap is notChristopher Faylor2001-09-091-7/+0
| | | | | | | | | | | forced to start at the same place in execed process. * heap.cc: Remove brk* macros for clarity throughout. * heap.h: Ditto. * shared.cc (shared_info::initialize): Move heap_chunk test into heap_chunk_size(). (heap_chunk_size): Check for chunk size here. Don't go to registry if heap_chunk_in_mb is already set. * smallprint.c (console_printf): Add Windows 95 concessions.
* * cygheap.h (init_cygheap): Move heap pointers here.Christopher Faylor2001-09-071-4/+4
| | | | | | | | | | | | | | | | | | | * include/sys/cygwin.h (perprocess): Remove heap pointers. * dcrt0.cc (__cygwin_user_data): Reflect obsolete perprocess stuff. (_dll_crt0): Don't initialize heap pointers. (cygwin_dll_init): Ditto. (release_upto): Use heap pointers from cygheap. * heap.h: Ditto. * fork.cc (fork_parent): Ditto. Don't set heap pointers in ch. (fork_child): Remove obsolete sigproc_fixup_after_fork. * shared.cc (memory_init): Reorganize so that cygheap initialization is called prior to regular heap since regular heap uses cygheap now. * sigproc.cc (proc_subproc): Eliminate zombies allocation. (sigproc_init): Move zombies alloation here. Don't free up array on fork, just reuse it. (sigproc_fixup_after_fork): Eliminate. * sigproc.h: Ditto. * include/cygwin/version.h: Reflect change to perprocess structure.
* * syscalls.cc (_link): Make sure that newpath does not exist. Set errno if itChristopher Faylor2001-01-291-2/+2
| | | | | | | | | | | | | | | does. * cygheap.cc (init_cheap): Don't specify a load address for the heap. It doesn't work on #!*& Windows 9x. (cygheap_init): Move GetUserName to memory_init. * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call to heap_init. * heap.cc (heap_init): Improve error output. * heap.h: Correct some declarations. * shared.cc (mount_table_init): Remove. (memory_init): Renamed from shared_init. Reorganize to accomodate strange Windows 9x problems with cygheap/heap interaction. * shared_info.h: Rename shared_init to memory_init.
* Break out more header info into separate files. Use appropriate header filesChristopher Faylor2000-09-081-0/+2
| | | | | | | | | | | | throughout. * shared.h: Remove. * cygwin_version.h: New file. * delqueue.h: New file. * environ.h: New file. * host_dependent.h: New file. * perprocess.h: New file. * registry.h: New file. * security.h: New file.
* * Makefile.in: Add cygheap.o.Christopher Faylor2000-09-031-0/+22
* child_info.h: Add specific exec class. * cygheap.h: New file. Contains declarations for cygwin heap. * cygheap.cc: New file. Implements cygwin heap functions. * dcrt0.cc (quoted): Simplify due to new method for passing arguments between cygwin programs. (alloc_stack_hard_way): Attempt to handle overlapped stack. (dll_crt0_1): Move child_info processing here. Accomodate new method for passing arguments between cygwin programs. Initialize cygwin heap. Establish __argc and __argv variables. (_dll_crt0): Move most of child_info processing to dll_crt0_1. (cygwin_dll_init): Remove duplication. * dtable.cc (dtable::extend): Allocate dtable using cygwin heap. (dtable::build_fhandler): Ditto for fhandler type being constructed. (dtable::dup_worker): Free new fhandler from cygwin heap on error. (dtable::select_*): Don't assume that this == fdtab. (dtable::linearize_fd_array): Delete. (dtable::delinearize_fd_array): Delete. (dtable::fixup_after_exec): New file. (dtable::vfork_child_dup): Use cygwin heap. (dtable::vfork_parent_restore): Ditto. * dtable.h: Remove obsolete methods. Add new method. * environ.cc (posify): Eliminate already_posix parameter and logic. (envsize): New function. (_addenv): Use envsize. (environ_init): Accept an argument pointing to an existing environment list. If supplied, allocate space for this in the the program's heap. * fhandler.cc (fhandler_base::operator =): Move here from fhandler.h. Use cygwin heap to allocate filenames. (fhandler_base::set_name): Allocate/free names from cygwin heap. (fhandler_base::linearize): Delete. (fhandler_base::de_linearize): Delete. (fhandler_base::operator delete): Free from cygwin heap. (fhandler_base::~fhandler_base): Ditto. * fhandler.h: Accomodate elimination of *linearize and other changes above. * fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from de_linearize. * heap.h: New file. * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin heap for name. fhandler_tty::fixup_after_exec): Rename from de_linearize. * fork.cc (fork): Call cygheap_fixup_in_child. * heap.cc: Use declarations in heap.h. * malloc.cc: Sprinkle assertions throughout to catch attempts to free/realloc something from the cygwin heap. * path.cc: Throughout, eliminate use of per-thread cache for cwd. Use cwd_* functions rather than cwd_* variables to access cwd_win32 and cwd_posix. (cwd_win32): New function. (cwd_posix): New function. (cwd_hash): New function. (cwd_fixup_after_exec): New function. * path.h: Accomodate path.cc changes. * pinfo.cc (pinfo_init): Accept a pointer to an environment table. Pass this to environ_init. Eliminate old 'title' tests. * pinfo.h: Accomodate above change in argument. * spawn.cc (struct av): New method for building argv list. (av::unshift): New method. (spawn_guts): Allocate everything that the child process needs in the cygwin heap and pass a pointer to this to the child. Build argv list using new method. Eliminate delinearize stuff. * thread.h: Eliminate _cwd_win32 and _cwd_posix buffers. * winsup.h: Eliminate obsolete functions. Add envsize() declaration.