Commit Graph

38 Commits (96e445d9e43e7d4a4cb32a1681098a6e7a170561)

Author SHA1 Message Date
Rob Davies 96e445d9e4 Reduce dependency on utils.h - new malloc wrapping scheme.
Remove xmalloc, xcalloc, xrealloc and xstrdup from utils.h and revert calls
to the normal malloc, calloc, realloc, strdup.  Add new files malloc_wrap.[ch]
with the wrapper functions.  malloc_wrap.h #defines malloc etc. to the
wrapper, but only if USE_MALLOC_WRAPPERS has been defined.

Put #include "malloc_wrap.h" in any file that uses *alloc or strdup.  This
is also in a #ifdef USE_MALLOC_WRAPPERS ... #endif block to make using the
wrappers optional.  Add -DUSE_MALLOC_WRAPPERS into the makefile so they
should normally get added.

This is an improvement on the previous method as we now don't need to
worry about stray function calls that were not changed to the wrapped version
and the code will still work even if the wrapping is disabled.

Other possible methods of doing this are using malloc_hook (glibc-specific),
adding -include malloc_wrap.h to the gcc command-line (somewhat
gcc-specific) or making our own malloc function and using dlopen (scary).
This way is probably the most portable.
2013-05-02 15:12:01 +01:00
Rob Davies b3d0a13b32 Merge branch 'master' into master_fixes. Merged up to release bwa-0.7.4-r385. 2013-04-23 17:31:34 +01:00
Heng Li 2f6897c72b r384: don't compile bwamem-lite by default 2013-04-23 11:27:30 -04:00
Rob Davies 9228e48efd Merge branch 'master' into master_fixes
Conflicts:
	Makefile
2013-03-11 13:50:49 +00:00
Heng Li 017be45407 r342: bugfix in bwasw - AS is off by one
but I do not understand why the old code does not have the same problem.
2013-03-08 12:06:45 -05:00
Rob Davies aabd990e8f Merge branch 'master' into master_fixes
Conflicts:
	Makefile
	bwape.c
	bwase.c
	bwtsw2_aux.c
	stdaln.c
2013-03-08 16:46:45 +00:00
Heng Li 042e1f4442 r334: added pemerge to bwa 2013-03-06 21:55:02 -05:00
Jon Sorenson 25366c7220 Fixing problem with linking to libm on some Ubuntu systems (I see this on machine running 11.04, kernel 3.0.0-14-virtual). Changing order of -lm on the command line seems to do the trick and should be tolerated in other environments. 2013-03-05 20:48:16 +00:00
Heng Li 98f8966750 r329: ditch stdaln.{c,h}; no changes to bwa-mem
stdaln.{c,h} was written ten years ago. Its local and SW extension code are
actually buggy (though that rarely happens and usually does not affect the
results too much). ksw.{c,h} is more concise, potentially faster, less buggy,
and richer in features.
2013-03-05 12:00:24 -05:00
Rob Davies 8a078cc16d Merge branch 'master' into master_fixes
Conflicts:
	bntseq.c
	bwamem.c
2013-03-05 10:21:07 +00:00
Heng Li 35fb7f9fdf r315: move kopen.o out of libbwa.a 2013-03-01 11:47:51 -05:00
Rob Davies 6beab5f765 Merge branch 'master' into master_fixes
Merge changes to commit c5434ac (0.7.0 release)

Conflicts:
	Makefile
	bwamem.c
2013-03-01 10:22:49 +00:00
Rob Davies 3d33ab063e Merge branch 'master' into master_fixes
Merged to master version b621d3a

Conflicts:
	Makefile
	bntseq.c
	bwa.c
	bwase.c
	bwaseqio.c
	bwtaln.c
	bwtindex.c
	bwtio.c
	bwtmisc.c
	bwtsw2_aux.c
	cs2nt.c
	fastmap.c
	khash.h
	kseq.h
	ksw.c
	kvec.h
	simple_dp.c
	utils.c
	utils.h
2013-03-01 09:37:46 +00:00
Heng Li df7c3f0000 r308: added a new API to convert region to CIGAR
and an example program demonstrating how to do single-end alignment in <50
lines of C code.
2013-02-27 22:28:29 -05:00
Heng Li 64d92d26df more documentation in ksw.h 2013-02-27 21:40:46 -05:00
Heng Li 570e082b38 change CC back to gcc 2013-02-24 23:45:40 -05:00
Heng Li 6e7903e9f3 added kopen support 2013-02-23 17:09:23 -05:00
Heng Li e613195e17 moved some common code to bwa.{c,h} 2013-02-23 15:30:46 -05:00
Heng Li 6230f86799 merged bwtmisc.c to bwtindex.c
bwtmisc.c implements routines related to indexing
2013-02-22 17:23:34 -05:00
Heng Li f122fad562 minor code clean up
bwtio.c is merged to bwt.c
2013-02-22 17:09:40 -05:00
Heng Li df1ff2b36e better and proper way to infer orinentation 2013-02-14 12:59:32 -05:00
Heng Li 2fc469d0c9 code backup 2013-02-12 12:09:36 -05:00
Heng Li 95d18449b3 merge bseq.{h,c} to utils.{h,c}
I do not like many small files.
2013-02-12 10:36:15 -05:00
Heng Li 6ad5a3c086 removed color-space support
which has been broken since 0.6.x
2013-02-12 10:21:17 -05:00
Heng Li e5ab59db53 Multiple changes:
1. Removed bwa.{h,c}. I am not going to finish them anyway.
2. Updated to the latest khash.h, which should be faster.
3. Define 64-bit vector and 128-bit integer/vector in utils.h.
2013-02-12 09:50:28 -05:00
Heng Li 59eaf650ac code backup 2013-02-11 10:59:38 -05:00
Heng Li 5a0b32bfd2 updated to the latest kseq.h 2013-02-06 14:38:40 -05:00
Heng Li 91debf412b move smem iterators to bwamem.{c,h} 2013-01-31 13:59:48 -05:00
Rob Davies b081ac9b8b Use wrapper functions to catch system errors
Use the wrapper functions in utils.c plus a few extra bits of error
checking code to catch system errors and exit non-zero when they occur.
2012-12-16 10:34:57 +00:00
Heng Li 1cef219667 compute CIGAR; rev seq not working 2012-04-07 22:00:03 -04:00
Heng Li a1abfe9977 API: aln seems working 2012-04-07 00:23:01 -04:00
Heng Li 182cb2e89c use standard SW when no SSE2 2011-11-19 19:38:21 -05:00
Heng Li c8c79ef024 mate rescue seems working (not MT) 2011-11-06 16:20:40 -05:00
Heng Li 17eaac5a21 compute insert size distribution 2011-11-05 23:17:52 -04:00
Heng Li f56edd07dd forward-backward search seems working 2011-10-25 12:31:36 -04:00
Heng Li 22c2252e15 added bidirectional bwt; seems buggy 2011-10-25 00:22:28 -04:00
Heng Li b96f180a15 move bwt_gen/* to the root directory 2011-10-20 11:56:24 -04:00
Heng Li 007c3eb75d Imported from my local bwa repository, the master repository. 2011-01-13 20:52:12 -05:00