Commit Graph

6 Commits

Author SHA1 Message Date
Aliaksey Kandratsenka
8be84e4a5c drop old mmap hooks and introduce internal & simpler mmap_hook.h
Previous implementation wasn't entirely safe w.r.t. 32-bit off_t
systems. Specifically around mmap replacement hook. Also, API was a
lot more general and broad than we actually need.

Sadly, old mmap hooks API was shipped with our public headers. But
thankfully it appears to be unused externally (checked via github
search). So we keep this old API and ABI for the sake of formal API
and ABI compatibility. But this old API is now empty and always
fails (some OS/hardware combinations didn't have functional
implementations of those hooks anyways).

New API is 64-bit clean and only provides us with what we need. Namely
being able to react to virtual address space mapping changes for
logging, heap profiling and heap leak checker. I.e. no pre hooks or
mmap-replacement hooks. We also explicitly not ship this API
externally to give us freedom to change it.

New code is also hopefully tidier and slightly more portable. At least
there are fewer arch-specific ifdef-s.

Another somewhat notable change is, since mmap hook isn't needed in
"minimal" configuration, we now don't override system's
mmap/munmap/etc functions in this configuration. No big deal, but it
reduces risk of damage if we somehow mess those up. I.e. musl's mmap
does few things that our mmap replacement doesn't, such as very fancy
vm_lock thingy. Which doesn't look critical, but is good thing for us
not to interfere with when not necessary.

Fixes issue #1406 and issue #1407. Lets also mention issue #1010 which
is somewhat relevant.
2023-07-21 16:13:19 -04:00
Aliaksey Kandratsenka
7dd1b82378 simplify project by making it C++-only
I.e. no need for any AC_LANG_PUSH stuff in configure. Most usefully,
only CXXFLAGS needs to be set now when you need to tweak compile
flags.
2023-07-02 22:30:00 -04:00
Aliaksey Kandratsenka
e521472f1a fix linking of page_heap_test on windows
After change to release page heap lock around returning memory back to
kernel, page heap test got dependency on page heap lock. Which was not
available on windows since relevant symbols are not exported.

Proposed fix is to simply duplicate all needed .cc files in
page_heap_test project instead of linking to dll. This is not perfect
but gets job done, until we figure out better solution (GNU/Linux will
eventually get hidden visibility and will need it).

This fixes github issue 1189.
2020-07-05 23:17:36 -07:00
Holy Wu
69867c523b Clean up MSVC projects
1.Remove superfluous per file settings for include directory and runtime library.
2.Remove unnecessary project tcmalloc_minimal_unittest-static. We can simply build libtcmalloc_minimal as a static library and then link against the single .lib file.
3.Add separate configurations of patching and overriding facility for release mode.
2018-08-14 22:34:00 -07:00
Aliaksei Kandratsenka
51a5613f21 Upgrade MSVC projects to MSVC2015 2018-08-05 15:54:00 -07:00
csilvers
5b80f01df1 * Replace usleep() and poll() with nanosleep() (glider)
* Document problems with _recalloc (csilvers)
	* Detect when x86_64 doesn't turn off frame pointers (csilvers)
	* Fix sysinfo.cc/etc to work with 64-bit os x (csilvers)
	* BUGFIX: Use __TEXT instead of __DATA to store tcmalloc fns (csilvers)
	* Added two numeric pageheap properties to tcmalloc (fikes)
	* Support for mallocranges stats visualization (sanjay)
	* Use libunwind for i386, not just x86_64 (ppluzhnikov)
	* Add ReleaseToSystem(num_bytes) (kash)
	* Provide corect library filenames under solaris (jeffrey)
	* BUGFIX: a simple bug in pprof --raw mode (mrabkin)
	* Prfer sys/ucontext.h to ucontext.h, to fix OS X 10.6 (csilvers)
	* Improve supprot for inlined functions in pprof (sanjay)
	* Document inaccuracies in profiling mmap calls (csilvers)
	* Update wget code to not use keepalive (mrabkin, csilvers)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@78 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2009-11-10 16:24:57 +00:00