88485cfa7f13affa28ec5765fe9b2db90cce42b6 markd Tue Dec 8 21:02:15 2020 -0800 hgPcr working diff --git src/jkOwnLib/genoFind.c src/jkOwnLib/genoFind.c index 233f912..d727250 100644 --- src/jkOwnLib/genoFind.c +++ src/jkOwnLib/genoFind.c @@ -55,31 +55,30 @@ { oneRead = read(sd, buf + totalRead, size - totalRead); if (oneRead < 0) { errAbort("Couldn't finish large read"); return oneRead; } else if (oneRead == 0) /* Avoid an infinite loop when the client closed the socket. */ break; totalRead += oneRead; } return totalRead; } - void genoFindFree(struct genoFind **pGenoFind) /* Free up a genoFind index. */ { struct genoFind *gf = *pGenoFind; int i; struct gfSeqSource *sources; if (gf != NULL) { freeMem(gf->lists); if (!gf->isMapped) { freeMem(gf->listSizes); freeMem(gf->allocated); } if ((sources = gf->sources) != NULL) @@ -201,31 +200,31 @@ static off_t genoFindWriteSources(struct genoFind *gf, FILE *f) /* write the sources to the file */ { off_t off = mustSeekAligned(f); int i; for (i = 0; i < gf->sourceCount; i++) genoFindWriteSource(gf->sources + i, f); return off; } static void genoFindReadSources(FILE *f, off_t off, struct genoFind *gf) /* read the sources from the file */ { mustSeek(f, off, SEEK_SET); -gf->sources = needLargeMem(gf->sourceCount * sizeof(struct gfSeqSource)); +gf->sources = needMem(gf->sourceCount * sizeof(struct gfSeqSource)); int i; for (i = 0; i < gf->sourceCount; i++) genoFindReadSource(f, gf->sources + i); } static off_t genoFindWriteListSizes(struct genoFind *gf, FILE *f) /* write the list sizes */ { off_t off = mustSeekAligned(f); // length = gf->tileSpaceSize mustWrite(f, gf->listSizes, gf->tileSpaceSize * sizeof(gf->listSizes[0])); return off; } static void genoFindMapListSize(void *memMapped, off_t off, struct genoFind *gf)